CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ZeeCalibration Class Reference

#include <Calibration/EcalCalibAlgos/src/ZeeCalibration.cc>

Inheritance diagram for ZeeCalibration:
edm::ESProducerLooper edm::ESProducer edm::EventSetupRecordIntervalFinder edm::EDLooper edm::ESProxyFactoryProducer edm::EDLooperBase edm::eventsetup::DataProxyProvider edm::EDConsumerBase

Public Member Functions

void beginOfJob () override
 Called at beginning of job. More...
 
Status duringLoop (const edm::Event &, const edm::EventSetup &) override
 Called at each event. More...
 
void endOfJob () override
 Called at end of job. More...
 
Status endOfLoop (const edm::EventSetup &, unsigned int iLoop) override
 Called at end of loop. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 Dummy implementation (job done in duringLoop) More...
 
virtual std::shared_ptr< EcalIntercalibConstantsproduceEcalIntercalibConstants (const EcalIntercalibConstantsRcd &iRecord)
 Produce Ecal interCalibrations. More...
 
void startingNewLoop (unsigned int iLoop) override
 Called at beginning of loop. More...
 
 ZeeCalibration (const edm::ParameterSet &iConfig)
 Constructor. More...
 
 ~ZeeCalibration () override
 Destructor. More...
 
- Public Member Functions inherited from edm::ESProducerLooper
 ESProducerLooper ()
 
 ESProducerLooper (const ESProducerLooper &)=delete
 
std::set< eventsetup::EventSetupRecordKeymodifyingRecords () const override
 
const ESProducerLooperoperator= (const ESProducerLooper &)=delete
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
 ~EDLooper () override
 
- Public Member Functions inherited from edm::EDLooperBase
virtual void attachTo (ActivityRegistry &)
 Override this method if you need to monitor the state of the processing. More...
 
virtual void beginOfJob (EventSetup const &)
 
void beginOfJob (EventSetupImpl const &)
 
void copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doEndOfLoop (EventSetupImpl const &es)
 
void doEndRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
void esPrefetchAsync (WaitingTaskHolder iTask, EventSetupImpl const &iImpl, Transition iTrans, ServiceToken const &iToken) const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prefetchAsync (WaitingTaskHolder iTask, ServiceToken const &token, Transition iTrans, Principal const &iPrincipal, EventSetupImpl const &iImpl) const
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
 ~EDLooperBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void bookHistograms ()
 
float computeCoefficientDistanceAtIteration (float v1[250], float v2[250], int size)
 
float EvalDPhi (float Phi, float Phi_ref)
 
float EvalDR (float Eta, float Eta_ref, float Phi, float Phi_ref)
 
double fEtaBarrelBad (double scEta) const
 
double fEtaBarrelGood (double scEta) const
 
double fEtaEndcapBad (double scEta) const
 
double fEtaEndcapGood (double scEta) const
 
void fillEleInfo (std::vector< HepMC::GenParticle * > &a, std::map< HepMC::GenParticle *, const reco::GsfElectron * > &b)
 
void fillMCInfo (HepMC::GenParticle *mcele)
 
void fillMCmap (const std::vector< const reco::GsfElectron * > *electronCollection, const std::vector< HepMC::GenParticle * > &mcEle, std::map< HepMC::GenParticle *, const reco::GsfElectron * > &myMCmap)
 
double getEtaCorrection (const reco::GsfElectron *)
 
std::pair< DetId, double > getHottestDetId (const std::vector< std::pair< DetId, float > > &mySCRecHits, const EBRecHitCollection *ebhits, const EERecHitCollection *eehits)
 
void printStatistics ()
 
void resetHistograms ()
 
void resetVariables ()
 
int ringNumberCorrector (int k)
 
bool xtalIsOnModuleBorder (EBDetId myEBDetId)
 

Private Attributes

char aHLTNames [6000]
 
bool aHLTResults [200]
 
TString aNames [200]
 
char aTriggerNames [200][30]
 
bool aTriggerResults [200]
 
int BARREL_ELECTRONS_AFTER_BORDER_CUT
 
int BARREL_ELECTRONS_BEFORE_BORDER_CUT
 
std::string barrelfile_
 
Int_t BBZN
 
Int_t BBZN_gg
 
Int_t BBZN_t0
 
Int_t BBZN_tt
 
float calibCoeff [250]
 
float calibCoeffError [250]
 
std::string calibMode_
 
double coefficientDistanceAtIteration [50]
 
int CRACK_ELECTRONS_IN_BARREL
 
int CRACK_ELECTRONS_IN_ENDCAP
 
Int_t EBZN
 
Int_t EBZN_gg
 
Int_t EBZN_t0
 
Int_t EBZN_tt
 
Int_t EEZN
 
Int_t EEZN_gg
 
Int_t EEZN_t0
 
Int_t EEZN_tt
 
std::string electronCollection_
 
std::string electronProducer_
 
unsigned int electronSelection_
 
std::string endcapfile_
 
std::string erechitCollection_
 
std::string erechitProducer_
 
unsigned int etaBins_
 
double etaMax_
 
double etaMin_
 
unsigned int etBins_
 
double etMax_
 
double etMin_
 
int GOLDEN_ELECTRONS_IN_BARREL
 
int GOLDEN_ELECTRONS_IN_ENDCAP
 
TH1F * h1_borderElectronClassification_
 
TH1F * h1_eleClasses_
 
TH1F * h1_electronCosTheta_SC_
 
TH1F * h1_electronCosTheta_SC_TK_
 
TH1F * h1_electronCosTheta_TK_
 
TH1F * h1_eleERecoOverEtrue_
 
TH1F * h1_eleEtaResol_
 
TH1F * h1_elePhiResol_
 
TH1F * h1_eventsAfterBorderSelection_
 
TH1F * h1_eventsAfterEWKSelection_
 
TH1F * h1_eventsBeforeBorderSelection_
 
TH1F * h1_eventsBeforeEWKSelection_
 
TH1F * h1_mc_
 
TH1F * h1_mcEB_
 
TH1F * h1_mcEBParz_ [25]
 
TH1F * h1_mcEE_
 
TH1F * h1_mcEEParz_ [25]
 
TH1F * h1_mcParz_ [25]
 
TH1F * h1_nEleReco_
 
TH1F * h1_occupancy_
 
TH1F * h1_occupancyBarrel_
 
TH1F * h1_occupancyEndcap_
 
TH1F * h1_occupancyVsEta_
 
TH1F * h1_occupancyVsEtaCrack_
 
TH1F * h1_occupancyVsEtaGold_
 
TH1F * h1_occupancyVsEtaShower_
 
TH1F * h1_occupancyVsEtaSilver_
 
TH1F * h1_preshowerOverSC_
 
TH1F * h1_reco_ZMass_
 
TH1F * h1_reco_ZMassBad_
 
TH1F * h1_reco_ZMassCorr_
 
TH1F * h1_reco_ZMassCorrBB_
 
TH1F * h1_reco_ZMassCorrEE_
 
TH1F * h1_reco_ZMassGood_
 
TH1F * h1_RMin_
 
TH1F * h1_RMinZ_
 
TH1F * h1_seedOverSC_
 
TH1F * h1_weightSumMeanBarrel_
 
TH1F * h1_weightSumMeanEndcap_
 
TH1F * h1_ZCandMult_
 
TH1F * h1_zEtaResol_
 
TH1F * h1_zMassResol_
 
TH1F * h1_zPhiResol_
 
TH2F * h2_chi2_ [25]
 
TH2F * h2_coeffVsEta_
 
TH2F * h2_coeffVsEtaGrouped_
 
TH2F * h2_coeffVsLoop_
 
TH2F * h2_fEtaBarrelBad_
 
TH2F * h2_fEtaBarrelGood_
 
TH2F * h2_fEtaEndcapBad_
 
TH2F * h2_fEtaEndcapGood_
 
TH2F * h2_iterations_ [25]
 
TH2F * h2_miscalRecal_
 
TH2F * h2_miscalRecalEB_
 
TH2F * h2_miscalRecalEE_
 
TH2F * h2_residualSigma_
 
TH2F * h2_xtalMiscalibCoeffBarrel_
 
TH2F * h2_xtalMiscalibCoeffEndcapMinus_
 
TH2F * h2_xtalMiscalibCoeffEndcapPlus_
 
TH2F * h2_xtalRecalibCoeffBarrel_ [25]
 
TH2F * h2_xtalRecalibCoeffEndcapMinus_ [25]
 
TH2F * h2_xtalRecalibCoeffEndcapPlus_ [25]
 
TH2F * h2_zMassDiffVsLoop_
 
TH2F * h2_zMassVsLoop_
 
TH2F * h2_zWidthVsLoop_
 
TH1F * h_eleEffEta [2]
 
TH1F * h_eleEffEta_ [2]
 
TH1F * h_eleEffPhi [2]
 
TH1F * h_eleEffPhi_ [2]
 
TH1F * h_eleEffPt [2]
 
TH1F * h_eleEffPt_ [2]
 
TH1F * h_ESCcorrEtrue_ [25]
 
TH2F * h_ESCcorrEtrueVsEta_ [25]
 
TH1F * h_ESCEtrue_ [25]
 
TH2F * h_ESCEtrueVsEta_ [25]
 
std::vector< unsigned int > hlAccept_
 
std::vector< unsigned int > hlErrors_
 
std::vector< std::string > hlNames_
 
Int_t hltCount
 
Int_t hltNamesLen
 
edm::InputTag hlTriggerResults_
 
std::vector< unsigned int > hlWasRun_
 
std::shared_ptr< EcalIntercalibConstantsical
 
bool init_
 
float initCalibCoeff [250]
 
bool isfirstcall_
 
double loopArray [50]
 
int loopFlag_
 
double mass
 
float mass4tree
 
float massDiff4tree
 
double maxInvMassCut_
 
std::string mcProducer_
 
Int_t MCZBB
 
Int_t MCZEB
 
Int_t MCZEE
 
double minInvMassCut_
 
TTree * myTree
 
ZeePlotsmyZeePlots_
 
ZeeRescaleFactorPlotsmyZeeRescaleFactorPlots_
 
unsigned int nAccept_
 
unsigned int nErrors_
 
unsigned int nEvents_
 
Int_t NEVT
 
float NewCalibCoeff [250]
 
unsigned int nWasRun_
 
TFile * outputFile_
 
std::string outputFileName_
 
int read_events
 
std::string RecalibBarrelHits_
 
std::string rechitCollection_
 
std::string rechitProducer_
 
std::string scCollection_
 
std::string scIslandCollection_
 
std::string scIslandProducer_
 
std::string scProducer_
 
int SHOWER_ELECTRONS_IN_BARREL
 
int SHOWER_ELECTRONS_IN_ENDCAP
 
double sigmaArray [50]
 
double sigmaErrorArray [50]
 
int SILVER_ELECTRONS_IN_BARREL
 
int SILVER_ELECTRONS_IN_ENDCAP
 
ZIterativeAlgorithmWithFittheAlgorithm_
 
unsigned int theMaxLoops
 
edm::ParameterSet theParameterSet
 
int TOTAL_ELECTRONS_IN_BARREL
 
int TOTAL_ELECTRONS_IN_ENDCAP
 
Int_t triggerCount
 
bool wantEtaCorrection_
 

Additional Inherited Members

- Public Types inherited from edm::EDLooperBase
enum  Status { kContinue, kStop }
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducerLooper
void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string()) override
 
void setIntervalFor (const eventsetup::EventSetupRecordKey &iKey, const IOVSyncValue &iTime, ValidityInterval &oInterval) override
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChangermoduleChanger ()
 This only returns a non-zero value during the call to endOfLoop. More...
 
ScheduleInfo const * scheduleInfo () const
 This returns a non-zero value after the constructor has been called. More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: Perform single electron calibration (tested on TB data only).

Implementation: <Notes on="" implementation>="">

Definition at line 71 of file ZeeCalibration.h.

Constructor & Destructor Documentation

◆ ZeeCalibration()

ZeeCalibration::ZeeCalibration ( const edm::ParameterSet iConfig)

Constructor.

Definition at line 67 of file ZeeCalibration.cc.

67  {
68 #ifdef DEBUG
69  std::cout << "[ZeeCalibration] Starting the ctor" << std::endl;
70 #endif
71 
72  theMaxLoops = iConfig.getUntrackedParameter<unsigned int>("maxLoops", 0);
73 
74  wantEtaCorrection_ = iConfig.getUntrackedParameter<bool>("wantEtaCorrection", true);
75 
76  outputFileName_ = iConfig.getParameter<std::string>("outputFile");
77 
78  minInvMassCut_ = iConfig.getUntrackedParameter<double>("minInvMassCut", 70.);
79  maxInvMassCut_ = iConfig.getUntrackedParameter<double>("maxInvMassCut", 110.);
80 
81  rechitProducer_ = iConfig.getParameter<std::string>("rechitProducer");
82  rechitCollection_ = iConfig.getParameter<std::string>("rechitCollection");
83 
84  erechitProducer_ = iConfig.getParameter<std::string>("erechitProducer");
85  erechitCollection_ = iConfig.getParameter<std::string>("erechitCollection");
86 
87  scProducer_ = iConfig.getParameter<std::string>("scProducer");
88  scCollection_ = iConfig.getParameter<std::string>("scCollection");
89 
90  scIslandProducer_ = iConfig.getParameter<std::string>("scIslandProducer");
91  scIslandCollection_ = iConfig.getParameter<std::string>("scIslandCollection");
92 
93  calibMode_ = iConfig.getUntrackedParameter<std::string>("ZCalib_CalibType");
94 
95  mcProducer_ = iConfig.getUntrackedParameter<std::string>("mcProducer", "");
96 
97  electronProducer_ = iConfig.getParameter<std::string>("electronProducer");
98  electronCollection_ = iConfig.getParameter<std::string>("electronCollection");
99 
100  outputFile_ = TFile::Open(outputFileName_.c_str(), "RECREATE"); // open output file to store histograms
101 
102  myTree = new TTree("myTree", "myTree");
103  // myTree->Branch("zMass","zMass", &mass);
104  myTree->Branch("zMass", &mass4tree, "mass/F");
105  myTree->Branch("zMassDiff", &massDiff4tree, "massDiff/F");
106 
107  barrelfile_ = iConfig.getUntrackedParameter<std::string>("initialMiscalibrationBarrel", "");
108  endcapfile_ = iConfig.getUntrackedParameter<std::string>("initialMiscalibrationEndcap", "");
109 
111  iConfig.getUntrackedParameter<unsigned int>("electronSelection", 0); //option for electron selection
112 
113  etaBins_ = iConfig.getUntrackedParameter<unsigned int>("etaBins", 10);
114  etBins_ = iConfig.getUntrackedParameter<unsigned int>("etBins", 10);
115 
116  etaMin_ = iConfig.getUntrackedParameter<double>("etaMin", 0.);
117  etMin_ = iConfig.getUntrackedParameter<double>("etMin", 0.);
118  etaMax_ = iConfig.getUntrackedParameter<double>("etaMax", 3.);
119  etMax_ = iConfig.getUntrackedParameter<double>("etMax", 100.);
120 
121  // new ZeePlots("zeePlots.root");
122  // ZeePlots->bookHistos();
123 
124  //ZeeCalibrationPLots("zeeCalibPlots");
125  //ZeecaPlots->bookHistos(maxsIter);
126 
127  hlTriggerResults_ = iConfig.getParameter<edm::InputTag>("HLTriggerResults");
128 
129  theParameterSet = iConfig;
130  EcalIndexingTools* myIndexTool = nullptr;
131 
132  myIndexTool = EcalIndexingTools::getInstance();
133 
135 
136  //creating the algorithm
138 
139  // Tell the framework what data is being produced
140  //setWhatProduced(this);
142  findingRecord<EcalIntercalibConstantsRcd>();
143 
144  for (int i = 0; i < 50; i++) {
146  loopArray[i] = -1.;
147  sigmaArray[i] = -1.;
148  sigmaErrorArray[i] = -1.;
149  }
150 
151 #ifdef DEBUG
152  std::cout << "[ZeeCalibration] Done with the ctor" << std::endl;
153 #endif
154 }

References barrelfile_, calibMode_, coefficientDistanceAtIteration, gather_cfg::cout, electronCollection_, electronProducer_, electronSelection_, endcapfile_, erechitCollection_, erechitProducer_, etaBins_, etaMax_, etaMin_, etBins_, etMax_, etMin_, EcalIndexingTools::getInstance(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hlTriggerResults_, mps_fire::i, loopArray, mass4tree, massDiff4tree, maxInvMassCut_, mcProducer_, minInvMassCut_, myTree, outputFile_, outputFileName_, produceEcalIntercalibConstants(), rechitCollection_, rechitProducer_, scCollection_, scIslandCollection_, scIslandProducer_, scProducer_, EcalIndexingTools::setBinRange(), edm::ESProducer::setWhatProduced(), sigmaArray, sigmaErrorArray, AlCaHLTBitMon_QueryRunRegistry::string, theAlgorithm_, theMaxLoops, theParameterSet, and wantEtaCorrection_.

◆ ~ZeeCalibration()

ZeeCalibration::~ZeeCalibration ( )
override

Destructor.

Definition at line 156 of file ZeeCalibration.cc.

156  {
157  // if (theAlgorithm_)
158  // delete theAlgorithm_;
159 }

Member Function Documentation

◆ beginOfJob()

void ZeeCalibration::beginOfJob ( )
overridevirtual

Called at beginning of job.

Reimplemented from edm::EDLooperBase.

Definition at line 169 of file ZeeCalibration.cc.

169 { isfirstcall_ = true; }

References isfirstcall_.

◆ bookHistograms()

void ZeeCalibration::bookHistograms ( )
private

Definition at line 1496 of file ZeeCalibration.cc.

1496  {
1497  h1_eventsBeforeEWKSelection_ = new TH1F("h1_eventsBeforeEWKSelection", "h1_eventsBeforeEWKSelection", 5, 0, 5);
1498  h1_eventsAfterEWKSelection_ = new TH1F("h1_eventsAfterEWKSelection", "h1_eventsAfterEWKSelection", 5, 0, 5);
1499 
1501  new TH1F("h1_eventsBeforeBorderSelection", "h1_eventsBeforeBorderSelection", 5, 0, 5);
1502  h1_eventsAfterBorderSelection_ = new TH1F("h1_eventsAfterBorderSelection", "h1_eventsAfterBorderSelection", 5, 0, 5);
1503 
1504  h1_seedOverSC_ = new TH1F("h1_seedOverSC", "h1_seedOverSC", 400, 0., 2.);
1505 
1507 
1509  new TH1F("h1_borderElectronClassification", "h1_borderElectronClassification", 55, -5, 50);
1510  h1_preshowerOverSC_ = new TH1F("h1_preshowerOverSC", "h1_preshowerOverSC", 400, 0., 1.);
1511 
1512  h2_fEtaBarrelGood_ = new TH2F("fEtaBarrelGood", "fEtaBarrelGood", 800, -4., 4., 800, 0.8, 1.2);
1513  h2_fEtaBarrelGood_->SetXTitle("Eta");
1514  h2_fEtaBarrelGood_->SetYTitle("1/fEtaBarrelGood");
1515 
1516  h2_fEtaBarrelBad_ = new TH2F("fEtaBarrelBad", "fEtaBarrelBad", 800, -4., 4., 800, 0.8, 1.2);
1517  h2_fEtaBarrelBad_->SetXTitle("Eta");
1518  h2_fEtaBarrelBad_->SetYTitle("1/fEtaBarrelBad");
1519 
1520  h2_fEtaEndcapGood_ = new TH2F("fEtaEndcapGood", "fEtaEndcapGood", 800, -4., 4., 800, 0.8, 1.2);
1521  h2_fEtaEndcapGood_->SetXTitle("Eta");
1522  h2_fEtaEndcapGood_->SetYTitle("1/fEtaEndcapGood");
1523 
1524  h2_fEtaEndcapBad_ = new TH2F("fEtaEndcapBad", "fEtaEndcapBad", 800, -4., 4., 800, 0.8, 1.2);
1525  h2_fEtaEndcapBad_->SetXTitle("Eta");
1526  h2_fEtaEndcapBad_->SetYTitle("1/fEtaEndcapBad");
1527 
1528  for (int i = 0; i < 2; i++) {
1529  char histoName[50];
1530 
1531  sprintf(histoName, "h_eleEffEta_%d", i);
1532  h_eleEffEta_[i] = new TH1F(histoName, histoName, 150, 0., 2.7);
1533  h_eleEffEta_[i]->SetXTitle("|#eta|");
1534 
1535  sprintf(histoName, "h_eleEffPhi_%d", i);
1536  h_eleEffPhi_[i] = new TH1F(histoName, histoName, 400, -4., 4.);
1537  h_eleEffPhi_[i]->SetXTitle("Phi");
1538 
1539  sprintf(histoName, "h_eleEffPt_%d", i);
1540  h_eleEffPt_[i] = new TH1F(histoName, histoName, 200, 0., 200.);
1541  h_eleEffPt_[i]->SetXTitle("p_{T}(GeV/c)");
1542  }
1543 
1545  new TH2F("h2_xtalMiscalibCoeffBarrel", "h2_xtalMiscalibCoeffBarrel", 171, -85, 85, 360, 0, 360);
1547  new TH2F("h2_xtalMiscalibCoeffEndcapMinus", "h2_xtalMiscalibCoeffEndcapMinus", 100, 0, 100, 100, 0, 100);
1549  new TH2F("h2_xtalMiscalibCoeffEndcapPlus", "h2_xtalMiscalibCoeffEndcapPlus", 100, 0, 100, 100, 0, 100);
1550 
1551  h2_xtalMiscalibCoeffBarrel_->SetXTitle("ieta");
1552  h2_xtalMiscalibCoeffBarrel_->SetYTitle("iphi");
1553 
1554  h2_xtalMiscalibCoeffEndcapMinus_->SetXTitle("ix");
1555  h2_xtalMiscalibCoeffEndcapMinus_->SetYTitle("iy");
1556 
1557  for (int i = 0; i < 25; i++) {
1558  char histoName[50];
1559  sprintf(histoName, "h_ESCEtrueVsEta_%d", i);
1560 
1561  h_ESCEtrueVsEta_[i] = new TH2F(histoName, histoName, 150, 0., 2.7, 300, 0., 1.5);
1562  h_ESCEtrueVsEta_[i]->SetXTitle("|#eta|");
1563  h_ESCEtrueVsEta_[i]->SetYTitle("E_{SC,raw}/E_{MC}");
1564 
1565  sprintf(histoName, "h_ESCEtrue_%d", i);
1566 
1567  h_ESCEtrue_[i] = new TH1F(histoName, histoName, 300, 0., 1.5);
1568 
1569  sprintf(histoName, "h2_chi2_%d", i);
1570  h2_chi2_[i] = new TH2F(histoName, histoName, 1000, -150, 150, 1000, -1, 5);
1571 
1572  sprintf(histoName, "h2_iterations_%d", i);
1573  h2_iterations_[i] = new TH2F(histoName, histoName, 1000, -150, 150, 1000, -1, 15);
1574 
1575  sprintf(histoName, "h_ESCcorrEtrueVsEta_%d", i);
1576 
1577  h_ESCcorrEtrueVsEta_[i] = new TH2F(histoName, histoName, 150, 0., 2.7, 300, 0., 1.5);
1578  h_ESCcorrEtrueVsEta_[i]->SetXTitle("|#eta|");
1579  h_ESCcorrEtrueVsEta_[i]->SetYTitle("E_{SC,#eta-corr}/E_{MC}");
1580 
1581  sprintf(histoName, "h_ESCcorrEtrue_%d", i);
1582 
1583  h_ESCcorrEtrue_[i] = new TH1F(histoName, histoName, 300, 0., 1.5);
1584 
1585  sprintf(histoName, "h2_xtalRecalibCoeffBarrel_%d", i);
1586  h2_xtalRecalibCoeffBarrel_[i] = new TH2F(histoName, histoName, 171, -85, 85, 360, 0, 360);
1587 
1588  h2_xtalRecalibCoeffBarrel_[i]->SetXTitle("ieta");
1589  h2_xtalRecalibCoeffBarrel_[i]->SetYTitle("iphi");
1590 
1591  sprintf(histoName, "h2_xtalRecalibCoeffEndcapMinus_%d", i);
1592  h2_xtalRecalibCoeffEndcapMinus_[i] = new TH2F(histoName, histoName, 100, 0, 100, 100, 0, 100);
1593  h2_xtalRecalibCoeffEndcapMinus_[i]->SetXTitle("ix");
1594  h2_xtalRecalibCoeffEndcapMinus_[i]->SetYTitle("iy");
1595 
1596  sprintf(histoName, "h2_xtalRecalibCoeffEndcapPlus_%d", i);
1597  h2_xtalRecalibCoeffEndcapPlus_[i] = new TH2F(histoName, histoName, 100, 0, 100, 100, 0, 100);
1598  h2_xtalRecalibCoeffEndcapPlus_[i]->SetXTitle("ix");
1599  h2_xtalRecalibCoeffEndcapPlus_[i]->SetYTitle("iy");
1600  }
1601 
1602  /*
1603  for (int i=0;i<15;i++)
1604  {
1605 
1606  char histoName[50];
1607 
1608  sprintf(histoName,"h_DiffZMassDistr_%d",i);
1609  h_DiffZMassDistr_[i] = new TH1F(histoName,histoName, 400, -20., 20.);
1610  h_DiffZMassDistr_[i]->SetXTitle("M_{Z, reco} - M_{Z, MC}");
1611  h_DiffZMassDistr_[i]->SetYTitle("events");
1612 
1613  sprintf(histoName,"h_ZMassDistr_%d",i);
1614  h_ZMassDistr_[i] = new TH1F(histoName,histoName, 200, 0., 150.);
1615  h_ZMassDistr_[i]->SetXTitle("RecoZmass (GeV)");
1616  h_ZMassDistr_[i]->SetYTitle("events");
1617 
1618  }
1619  */
1620 
1621  h1_zMassResol_ = new TH1F("zMassResol", "zMassResol", 200, -50., 50.);
1622  h1_zMassResol_->SetXTitle("M_{Z, reco} - M_{Z, MC}");
1623  h1_zMassResol_->SetYTitle("events");
1624 
1625  h1_eleEtaResol_ = new TH1F("eleEtaResol", "eleEtaResol", 100, -0.01, 0.01);
1626  h1_eleEtaResol_->SetXTitle("#eta_{reco} - #eta_{MC}");
1627  h1_eleEtaResol_->SetYTitle("events");
1628 
1629  h1_electronCosTheta_TK_ = new TH1F("electronCosTheta_TK", "electronCosTheta_TK", 100, -1, 1);
1630  h1_electronCosTheta_TK_->SetXTitle("cos #theta_{12}");
1631  h1_electronCosTheta_TK_->SetYTitle("events");
1632 
1633  h1_electronCosTheta_SC_ = new TH1F("electronCosTheta_SC", "electronCosTheta_SC", 100, -1, 1);
1634  h1_electronCosTheta_SC_->SetXTitle("cos #theta_{12}");
1635  h1_electronCosTheta_SC_->SetYTitle("events");
1636 
1637  h1_electronCosTheta_SC_TK_ = new TH1F("electronCosTheta_SC_TK", "electronCosTheta_SC_TK", 200, -0.1, 0.1);
1638  h1_electronCosTheta_SC_TK_->SetXTitle("cos #theta_{12}^{SC}/ cos #theta_{12}^{TK} - 1");
1639  h1_electronCosTheta_SC_TK_->SetYTitle("events");
1640 
1641  h1_elePhiResol_ = new TH1F("elePhiResol", "elePhiResol", 100, -0.01, 0.01);
1642  h1_elePhiResol_->SetXTitle("#phi_{reco} - #phi_{MC}");
1643  h1_elePhiResol_->SetYTitle("events");
1644 
1645  h1_zEtaResol_ = new TH1F("zEtaResol", "zEtaResol", 200, -1., 1.);
1646  h1_zEtaResol_->SetXTitle("#eta_{Z, reco} - #eta_{Z, MC}");
1647  h1_zEtaResol_->SetYTitle("events");
1648 
1649  h1_zPhiResol_ = new TH1F("zPhiResol", "zPhiResol", 200, -1., 1.);
1650  h1_zPhiResol_->SetXTitle("#phi_{Z, reco} - #phi_{Z, MC}");
1651  h1_zPhiResol_->SetYTitle("events");
1652 
1653  h1_nEleReco_ = new TH1F("nEleReco", "Number of reco electrons", 10, -0.5, 10.5);
1654  h1_nEleReco_->SetXTitle("nEleReco");
1655  h1_nEleReco_->SetYTitle("events");
1656 
1657  // h1_occupancyVsEta_ = new TH1F("occupancyVsEta","occupancyVsEta",EcalRingCalibrationTools::N_RING_TOTAL,0,(float)EcalRingCalibrationTools::N_RING_TOTAL);
1658 
1659  h1_occupancyVsEta_ = new TH1F("occupancyVsEta", "occupancyVsEta", 249, -124, 124);
1660  h1_occupancyVsEta_->SetYTitle("Weighted electron statistics");
1661  h1_occupancyVsEta_->SetXTitle("Eta channel");
1662 
1663  h1_weightSumMeanBarrel_ = new TH1F("weightSumMeanBarrel", "weightSumMeanBarrel", 10000, 0, 10000);
1664  h1_weightSumMeanEndcap_ = new TH1F("weightSumMeanEndcap", "weightSumMeanEndcap", 10000, 0, 10000);
1665 
1666  h1_occupancy_ = new TH1F("occupancy", "occupancy", 1000, 0, 10000);
1667  h1_occupancy_->SetXTitle("Weighted electron statistics");
1668 
1669  h1_occupancyBarrel_ = new TH1F("occupancyBarrel", "occupancyBarrel", 1000, 0, 10000);
1670  h1_occupancyBarrel_->SetXTitle("Weighted electron statistics");
1671 
1672  h1_occupancyEndcap_ = new TH1F("occupancyEndcap", "occupancyEndcap", 1000, 0, 10000);
1673  h1_occupancyEndcap_->SetXTitle("Weighted electron statistics");
1674 
1675  h1_eleClasses_ = new TH1F("eleClasses", "eleClasses", 301, -1, 300);
1676  h1_eleClasses_->SetXTitle("classCode");
1677  h1_eleClasses_->SetYTitle("#");
1678 
1680 
1682 
1684 
1686 
1687  h1_ZCandMult_ = new TH1F("ZCandMult", "Multiplicity of Z candidates in one event", 10, -0.5, 10.5);
1688  h1_ZCandMult_->SetXTitle("ZCandMult");
1689 
1690  h1_reco_ZMass_ = new TH1F("reco_ZMass", "Inv. mass of 2 reco Electrons", 200, 0., 150.);
1691  h1_reco_ZMass_->SetXTitle("reco_ZMass (GeV)");
1692  h1_reco_ZMass_->SetYTitle("events");
1693 
1694  h1_reco_ZMassCorr_ = new TH1F("reco_ZMassCorr", "Inv. mass of 2 corrected reco Electrons", 200, 0., 150.);
1695  h1_reco_ZMassCorr_->SetXTitle("reco_ZMass (GeV)");
1696  h1_reco_ZMassCorr_->SetYTitle("events");
1697 
1698  h1_reco_ZMassCorrBB_ = new TH1F("reco_ZMassCorrBB", "Inv. mass of 2 corrected reco Electrons", 200, 0., 150.);
1699  h1_reco_ZMassCorrBB_->SetXTitle("reco_ZMass (GeV)");
1700  h1_reco_ZMassCorrBB_->SetYTitle("events");
1701 
1702  h1_reco_ZMassCorrEE_ = new TH1F("reco_ZMassCorrEE", "Inv. mass of 2 corrected reco Electrons", 200, 0., 150.);
1703  h1_reco_ZMassCorrEE_->SetXTitle("reco_ZMass (GeV)");
1704  h1_reco_ZMassCorrEE_->SetYTitle("events");
1705 
1706  // h2_coeffVsEta_= new TH2F("h2_calibCoeffVsEta","h2_calibCoeffVsEta",EcalRingCalibrationTools::N_RING_TOTAL,0, (double)EcalRingCalibrationTools::N_RING_TOTAL, 200, 0., 2.);
1707 
1708  h2_coeffVsEta_ = new TH2F("h2_calibCoeffVsEta", "h2_calibCoeffVsEta", 249, -124, 125, 200, 0., 2.);
1709  h2_coeffVsEta_->SetXTitle("Eta channel");
1710  h2_coeffVsEta_->SetYTitle("recalibCoeff");
1711 
1713  new TH2F("h2_calibCoeffVsEtaGrouped", "h2_calibCoeffVsEtaGrouped", 200, 0., 3., 200, 0.6, 1.4);
1714  h2_coeffVsEtaGrouped_->SetXTitle("|#eta|");
1715  h2_coeffVsEtaGrouped_->SetYTitle("recalibCoeff");
1716 
1717  h2_zMassVsLoop_ = new TH2F("h2_zMassVsLoop", "h2_zMassVsLoop", 1000, 0, 40, 90, 80., 95.);
1718 
1719  h2_zMassDiffVsLoop_ = new TH2F("h2_zMassDiffVsLoop", "h2_zMassDiffVsLoop", 1000, 0, 40, 100, -1., 1.);
1720  h2_zMassDiffVsLoop_->SetXTitle("Iteration");
1721  h2_zMassDiffVsLoop_->SetYTitle("M_{Z, reco peak} - M_{Z, true}");
1722 
1723  h2_zWidthVsLoop_ = new TH2F("h2_zWidthVsLoop", "h2_zWidthVsLoop", 1000, 0, 40, 100, 0., 10.);
1724 
1725  h2_coeffVsLoop_ = new TH2F("h2_coeffVsLoop", "h2_coeffVsLoop", 1000, 0, 40, 100, 0., 2.);
1726 
1727  h2_residualSigma_ = new TH2F("h2_residualSigma", "h2_residualSigma", 1000, 0, 40, 100, 0., .5);
1728 
1729  h2_miscalRecal_ = new TH2F("h2_miscalRecal", "h2_miscalRecal", 500, 0., 2., 500, 0., 2.);
1730  h2_miscalRecal_->SetXTitle("initCalibCoeff");
1731  h2_miscalRecal_->SetYTitle("1/RecalibCoeff");
1732 
1733  h2_miscalRecalEB_ = new TH2F("h2_miscalRecalEB", "h2_miscalRecalEB", 500, 0., 2., 500, 0., 2.);
1734  h2_miscalRecalEB_->SetXTitle("initCalibCoeff");
1735  h2_miscalRecalEB_->SetYTitle("1/RecalibCoeff");
1736 
1737  h2_miscalRecalEE_ = new TH2F("h2_miscalRecalEE", "h2_miscalRecalEE", 500, 0., 2., 500, 0., 2.);
1738  h2_miscalRecalEE_->SetXTitle("initCalibCoeff");
1739  h2_miscalRecalEE_->SetYTitle("1/RecalibCoeff");
1740 
1741  h1_mc_ = new TH1F("h1_residualMiscalib", "h1_residualMiscalib", 200, -0.2, 0.2);
1742  h1_mcEB_ = new TH1F("h1_residualMiscalibEB", "h1_residualMiscalibEB", 200, -0.2, 0.2);
1743  h1_mcEE_ = new TH1F("h1_residualMiscalibEE", "h1_residualMiscalibEE", 200, -0.2, 0.2);
1744 
1745  for (int i = 0; i < 25; i++) {
1746  char histoName[50];
1747  /*
1748  sprintf(histoName,"h2_miscalRecalParz_%d",i);
1749  h2_miscalRecalParz_[i] = new TH2F(histoName,histoName,500, 0., 2., 500, 0., 2.);
1750  h2_miscalRecalParz_[i]->SetXTitle("initCalibCoeff");
1751  h2_miscalRecalParz_[i]->SetYTitle("1/recalibCoeff");
1752 
1753  sprintf(histoName,"h2_miscalRecalEBParz_%d",i);
1754  h2_miscalRecalEBParz_[i] = new TH2F(histoName,histoName,500, 0., 2., 500, 0., 2.);
1755  h2_miscalRecalEBParz_[i]->SetXTitle("initCalibCoeff");
1756  h2_miscalRecalEBParz_[i]->SetYTitle("1/recalibCoeff");
1757 
1758  sprintf(histoName,"h2_miscalRecalEEParz_%d",i);
1759  h2_miscalRecalEEParz_[i] = new TH2F(histoName,histoName,500, 0., 2., 500, 0., 2.);
1760  h2_miscalRecalEEParz_[i]->SetXTitle("initCalibCoeff");
1761  h2_miscalRecalEEParz_[i]->SetYTitle("1/recalibCoeff");
1762  */
1763 
1764  sprintf(histoName, "h1_residualMiscalibParz_%d", i);
1765  h1_mcParz_[i] = new TH1F(histoName, histoName, 200, -0.2, 0.2);
1766  sprintf(histoName, "h1_residualMiscalibEBParz_%d", i);
1767  h1_mcEBParz_[i] = new TH1F(histoName, histoName, 200, -0.2, 0.2);
1768  sprintf(histoName, "h1_residualMiscalibEEParz_%d", i);
1769  h1_mcEEParz_[i] = new TH1F(histoName, histoName, 200, -0.2, 0.2);
1770  }
1771 }

References ZeePlots::bookEleHistograms(), ZeePlots::bookEleMCHistograms(), ZeePlots::bookHLTHistograms(), ZeePlots::bookZHistograms(), ZeePlots::bookZMCHistograms(), h1_borderElectronClassification_, h1_eleClasses_, h1_electronCosTheta_SC_, h1_electronCosTheta_SC_TK_, h1_electronCosTheta_TK_, h1_eleEtaResol_, h1_elePhiResol_, h1_eventsAfterBorderSelection_, h1_eventsAfterEWKSelection_, h1_eventsBeforeBorderSelection_, h1_eventsBeforeEWKSelection_, h1_mc_, h1_mcEB_, h1_mcEBParz_, h1_mcEE_, h1_mcEEParz_, h1_mcParz_, h1_nEleReco_, h1_occupancy_, h1_occupancyBarrel_, h1_occupancyEndcap_, h1_occupancyVsEta_, h1_preshowerOverSC_, h1_reco_ZMass_, h1_reco_ZMassCorr_, h1_reco_ZMassCorrBB_, h1_reco_ZMassCorrEE_, h1_seedOverSC_, h1_weightSumMeanBarrel_, h1_weightSumMeanEndcap_, h1_ZCandMult_, h1_zEtaResol_, h1_zMassResol_, h1_zPhiResol_, h2_chi2_, h2_coeffVsEta_, h2_coeffVsEtaGrouped_, h2_coeffVsLoop_, h2_fEtaBarrelBad_, h2_fEtaBarrelGood_, h2_fEtaEndcapBad_, h2_fEtaEndcapGood_, h2_iterations_, h2_miscalRecal_, h2_miscalRecalEB_, h2_miscalRecalEE_, h2_residualSigma_, h2_xtalMiscalibCoeffBarrel_, h2_xtalMiscalibCoeffEndcapMinus_, h2_xtalMiscalibCoeffEndcapPlus_, h2_xtalRecalibCoeffBarrel_, h2_xtalRecalibCoeffEndcapMinus_, h2_xtalRecalibCoeffEndcapPlus_, h2_zMassDiffVsLoop_, h2_zMassVsLoop_, h2_zWidthVsLoop_, h_eleEffEta_, h_eleEffPhi_, h_eleEffPt_, h_ESCcorrEtrue_, h_ESCcorrEtrueVsEta_, h_ESCEtrue_, h_ESCEtrueVsEta_, HltBtagPostValidation_cff::histoName, mps_fire::i, and myZeePlots_.

Referenced by duringLoop().

◆ computeCoefficientDistanceAtIteration()

float ZeeCalibration::computeCoefficientDistanceAtIteration ( float  v1[250],
float  v2[250],
int  size 
)
private

Definition at line 2007 of file ZeeCalibration.cc.

2007  {
2008  float dist(0.);
2009 
2010  for (int i = 0; i < size; i++) {
2011  // std::cout<< "[ZeeCalibration::computeCoefficientDistanceAtIteration] Adding term "<<pow( v1[i]-v2[i], 2 )<<" from v1 "<<v1[i]<<" and v2 "<<v2[i]<<std::endl;
2012 
2013  bool isNearCrack = false;
2014 
2015  if (calibMode_ == "RING") { //exclude non-calibrated rings from computation
2016 
2017  isNearCrack = (abs(ringNumberCorrector(i)) == 1 || abs(ringNumberCorrector(i)) == 25 ||
2018  abs(ringNumberCorrector(i)) == 26 || abs(ringNumberCorrector(i)) == 45 ||
2019  abs(ringNumberCorrector(i)) == 46 || abs(ringNumberCorrector(i)) == 65 ||
2020  abs(ringNumberCorrector(i)) == 66 || abs(ringNumberCorrector(i)) == 85 ||
2021  abs(ringNumberCorrector(i)) == 86 || abs(ringNumberCorrector(i)) == 124);
2022  }
2023 
2024  if (!isNearCrack)
2025  dist += pow(v1[i] - v2[i], 2);
2026  }
2027 
2028  dist = sqrt(dist) / size;
2029 
2030  return dist;
2031 }

References funct::abs(), calibMode_, mps_fire::i, funct::pow(), ringNumberCorrector(), findQualityFiles::size, and mathSSE::sqrt().

Referenced by endOfLoop().

◆ duringLoop()

edm::EDLooper::Status ZeeCalibration::duringLoop ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Called at each event.

START HERE....

Implements edm::EDLooper.

Definition at line 578 of file ZeeCalibration.cc.

578  {
579  using namespace edm;
580 
581 #ifdef DEBUG
582  std::cout << "[ZeeCalibration] Entering duringLoop" << std::endl;
583 #endif
584 
585  // code that used to be in beginJob
586  if (isfirstcall_) {
587  //inizializzare la geometria di ecal
589  iSetup.get<CaloGeometryRecord>().get(pG);
591 
592  myZeePlots_ = new ZeePlots("zeePlots.root");
593  // myZeeRescaleFactorPlots_ = new ZeeRescaleFactorPlots("zeeRescaleFactorPlots.root");
594 
595  // go to *OUR* rootfile and book histograms
596  outputFile_->cd();
597  bookHistograms();
598 
599  std::cout << "[ZeeCalibration::beginOfJob] Histograms booked " << std::endl;
600 
601  loopFlag_ = 0;
602 
603  //Read miscalibration map if requested
604  CaloMiscalibMapEcal* miscalibMap = nullptr;
605  if (!barrelfile_.empty() || !barrelfile_.empty()) {
606  miscalibMap = new CaloMiscalibMapEcal();
607  miscalibMap->prefillMap();
608  }
609 
610  if (!barrelfile_.empty()) {
611  MiscalibReaderFromXMLEcalBarrel barrelreader_(*miscalibMap);
612  barrelreader_.parseXMLMiscalibFile(barrelfile_);
613 #ifdef DEBUG
614  std::cout << "[ZeeCalibration::beginOfJob] Parsed EB miscal file" << std::endl;
615 #endif
616  }
617 
618  if (!endcapfile_.empty()) {
619  MiscalibReaderFromXMLEcalEndcap endcapreader_(*miscalibMap);
620  endcapreader_.parseXMLMiscalibFile(endcapfile_);
621 #ifdef DEBUG
622  std::cout << "[ZeeCalibration::beginOfJob] Parsed EE miscal file" << std::endl;
623 #endif
624  }
625 
626  std::cout << " theAlgorithm_->getNumberOfChannels() " << theAlgorithm_->getNumberOfChannels() << std::endl;
627 
629  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
630  calibCoeff[k] = 1.;
631  calibCoeffError[k] = 0.;
632 
633  std::vector<DetId> ringIds;
634 
635  if (calibMode_ == "RING")
637 
638  if (calibMode_ == "MODULE")
640 
641  if (calibMode_ == "ABS_SCALE" || calibMode_ == "ETA_ET_MODE")
643 
644  if (miscalibMap) {
645  initCalibCoeff[k] = 0.;
646  for (unsigned int iid = 0; iid < ringIds.size(); ++iid) {
647  float miscalib = *(miscalibMap->get().getMap().find(ringIds[iid]));
648  // float miscalib=miscalibMap->get().getMap().find(ringIds[iid])->second; ////////AP
649  initCalibCoeff[k] += miscalib;
650  }
651  initCalibCoeff[k] /= (float)ringIds.size();
652  std::cout << k << " " << initCalibCoeff[k] << " " << ringIds.size() << std::endl;
653  } else {
654  initCalibCoeff[k] = 1.;
655  }
656  }
657 
658  ical = std::make_shared<EcalIntercalibConstants>();
659 
660  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
661  // std::vector<DetId> ringIds = EcalRingCalibrationTools::getDetIdsInRing(k);
662 
663  std::vector<DetId> ringIds;
664 
665  if (calibMode_ == "RING")
667 
668  if (calibMode_ == "MODULE")
670 
671  if (calibMode_ == "ABS_SCALE" || calibMode_ == "ETA_ET_MODE")
673 
674  for (unsigned int iid = 0; iid < ringIds.size(); ++iid) {
675  // ical->setValue( ringIds[iid], 1. * initCalibCoeff[k] );
676 
677  if (ringIds[iid].subdetId() == EcalBarrel) {
678  EBDetId myEBDetId(ringIds[iid]);
679  h2_xtalMiscalibCoeffBarrel_->SetBinContent(
680  myEBDetId.ieta() + 86,
681  myEBDetId.iphi(),
682  *(miscalibMap->get().getMap().find(ringIds[iid]))); //fill TH2 with miscalibCoeff
683  }
684 
685  if (ringIds[iid].subdetId() == EcalEndcap) {
686  EEDetId myEEDetId(ringIds[iid]);
687  if (myEEDetId.zside() < 0)
688  h2_xtalMiscalibCoeffEndcapMinus_->SetBinContent(
689  myEEDetId.ix(),
690  myEEDetId.iy(),
691  *(miscalibMap->get().getMap().find(ringIds[iid]))); //fill TH2 with miscalibCoeff
692 
693  if (myEEDetId.zside() > 0)
694  h2_xtalMiscalibCoeffEndcapPlus_->SetBinContent(
695  myEEDetId.ix(),
696  myEEDetId.iy(),
697  *(miscalibMap->get().getMap().find(ringIds[iid]))); //fill TH2 with miscalibCoeff
698  }
699 
700  ical->setValue(ringIds[iid], *(miscalibMap->get().getMap().find(ringIds[iid])));
701  }
702 
703  read_events = 0;
704  init_ = false;
705  }
706  isfirstcall_ = false;
707  } // if isfirstcall
708 
710 
711  for (unsigned int iHLT = 0; iHLT < 200; ++iHLT) {
712  aHLTResults[iHLT] = false;
713  }
714 
715 #ifdef DEBUG
716  std::cout << "[ZeeCalibration::duringLoop] Done with initializing aHLTresults[] " << std::endl;
717 #endif
718 
719  edm::Handle<edm::TriggerResults> hltTriggerResultHandle;
720  iEvent.getByLabel(hlTriggerResults_, hltTriggerResultHandle);
721 
722  if (!hltTriggerResultHandle.isValid()) {
723  //std::cout << "invalid handle for HLT TriggerResults" << std::endl;
724  } else {
725  hltCount = hltTriggerResultHandle->size();
726 
727  if (loopFlag_ == 0)
728  myZeePlots_->fillHLTInfo(hltTriggerResultHandle);
729 
730 #ifdef DEBUG
731  std::cout << "[ZeeCalibration::duringLoop] Done with myZeePlots_->fillHLTInfo(hltTriggerResultHandle); "
732  << std::endl;
733 #endif
734 
735  for (int i = 0; i < hltCount; i++) {
736  aHLTResults[i] = hltTriggerResultHandle->accept(i);
737 
738  //HLT bit 32 = HLT1Electron
739  //HLT bit 34 = HLT2Electron
740  //HLT bit 35 = HLT2ElectronRelaxed
741  }
742 
743  if (!aHLTResults[32] && !aHLTResults[34] && !aHLTResults[35])
744  return kContinue;
745  }
746 
747 #ifdef DEBUG
748  std::cout << "[ZeeCalibration::duringLoop] End HLT section" << std::endl;
749 #endif
750 
752 
753  std::vector<HepMC::GenParticle*> mcEle;
754 
755  float myGenZMass(-1);
756 
757  if (!mcProducer_.empty()) {
758  //DUMP GENERATED Z MASS - BEGIN
759  Handle<HepMCProduct> hepProd;
760  // iEvent.getByLabel( "source", hepProd ) ;
761  iEvent.getByLabel(mcProducer_, hepProd);
762 
763  const HepMC::GenEvent* myGenEvent = hepProd->GetEvent();
764 
765  if (loopFlag_ == 0)
766  myZeePlots_->fillZMCInfo(&(*myGenEvent));
767 
768 #ifdef DEBUG
769  std::cout << "[ZeeCalibration::duringLoop] Done with myZeePlots_->fillZMCInfo( & (*myGenEvent) ); " << std::endl;
770 #endif
771 
772  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
773  ++p) {
774  //return a pointer to MC Z in the event
775  if ((*p)->pdg_id() == 23 && (*p)->status() == 2) {
776  myGenZMass = (*p)->momentum().m();
777  }
778  }
779  //DUMP GENERATED Z MASS - END
780 
781  if (loopFlag_ == 0)
782  myZeePlots_->fillEleMCInfo(&(*myGenEvent));
783 
784  //loop over MC positrons and find the closest MC positron in (eta,phi) phace space - begin
785  HepMC::GenParticle MCele;
786 
787  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
788  ++p) {
789  if (abs((*p)->pdg_id()) == 11) {
790  mcEle.push_back((*p));
791  MCele = *(*p);
792  }
793  }
794 
795  if (mcEle.size() == 2 && fabs(mcEle[0]->momentum().eta()) < 2.4 && fabs(mcEle[1]->momentum().eta()) < 2.4) {
796  NEVT++;
797 
798  if (fabs(mcEle[0]->momentum().eta()) < 1.479 && fabs(mcEle[1]->momentum().eta()) < 1.479)
799  MCZBB++;
800 
801  if ((fabs(mcEle[0]->momentum().eta()) > 1.479 && fabs(mcEle[1]->momentum().eta()) < 1.479) ||
802  (fabs(mcEle[0]->momentum().eta()) < 1.479 && fabs(mcEle[1]->momentum().eta()) > 1.479))
803  MCZEB++;
804 
805  if (fabs(mcEle[0]->momentum().eta()) > 1.479 && fabs(mcEle[1]->momentum().eta()) > 1.479)
806  MCZEE++;
807  }
808  }
809 
810  // Get EBRecHits
812  try {
814  } catch (std::exception& ex) {
815  std::cerr << "Error! can't get the product EBRecHitCollection " << std::endl;
816  }
817  const EBRecHitCollection* hits = phits.product(); // get a ptr to the product
818 
819  // Get EERecHits
821  try {
822  iEvent.getByLabel(erechitProducer_, erechitCollection_, ephits);
823  } catch (std::exception& ex) {
824  std::cerr << "Error! can't get the product EERecHitCollection " << std::endl;
825  }
826  const EERecHitCollection* ehits = ephits.product(); // get a ptr to the product
827 
828  //Get Hybrid SuperClusters
830  try {
831  iEvent.getByLabel(scProducer_, scCollection_, pSuperClusters);
832  } catch (std::exception& ex) {
833  std::cerr << "Error! can't get the product SuperClusterCollection " << std::endl;
834  }
835  const reco::SuperClusterCollection* scCollection = pSuperClusters.product();
836 
837 #ifdef DEBUG
838  std::cout << "scCollection->size()" << scCollection->size() << std::endl;
839  for (reco::SuperClusterCollection::const_iterator scIt = scCollection->begin(); scIt != scCollection->end(); scIt++) {
840  std::cout << scIt->energy() << std::endl;
841  }
842 #endif
843 
844  //Get Island SuperClusters
845  Handle<reco::SuperClusterCollection> pIslandSuperClusters;
846  try {
847  iEvent.getByLabel(scIslandProducer_, scIslandCollection_, pIslandSuperClusters);
848  } catch (std::exception& ex) {
849  std::cerr << "Error! can't get the product IslandSuperClusterCollection " << std::endl;
850  }
851  const reco::SuperClusterCollection* scIslandCollection = pIslandSuperClusters.product();
852 
853 #ifdef DEBUG
854  std::cout << "scCollection->size()" << scIslandCollection->size() << std::endl;
855 #endif
856 
857  if ((scCollection->size() + scIslandCollection->size()) < 2)
858  return kContinue;
859 
860  // Get Electrons
862  try {
863  iEvent.getByLabel(electronProducer_, electronCollection_, pElectrons);
864  } catch (std::exception& ex) {
865  std::cerr << "Error! can't get the product ElectronCollection " << std::endl;
866  }
868 
869  /*
870  //reco-mc association map
871  std::map<HepMC::GenParticle*,const reco::PixelMatchGsfElectron*> myMCmap;
872 
873  fillMCmap(&(*electronCollection),mcEle,myMCmap);
874 
875  fillEleInfo(mcEle,myMCmap);
876  */
877 
878  if (electronCollection->size() < 2)
879  return kContinue;
880 
881  if (!hits && !ehits) {
882  std::cout << "!hits" << std::endl;
883  return kContinue;
884  }
885 
886  if (hits->empty() && ehits->empty()) {
887  std::cout << "hits->size() == 0" << std::endl;
888  return kContinue;
889  }
890 
891  if (!electronCollection) {
892  std::cout << "!electronCollection" << std::endl;
893  return kContinue;
894  }
895 
896  if (electronCollection->empty()) {
897  std::cout << "electronCollection->size() == 0" << std::endl;
898  return kContinue;
899  }
900 
904 
905  read_events++;
906 
907  // std::cout << "read_events = " << read_events << std::endl;
908 
910 
911 #ifdef DEBUG
912  std::cout << " Starting with myZeePlots_->fillEleInfo(electronCollection); " << std::endl;
913 #endif
914 
915  if (loopFlag_ == 0)
917 
918 #ifdef DEBUG
919  std::cout << " Done with myZeePlots_->fillEleInfo(electronCollection); " << std::endl;
920 #endif
921 
922  //FILL an electron vector - end
923  //###################################Electron-SC association: begin#####################################################
924  //Filling new ElectronCollection with new SC ref and calibElectron container
925  std::vector<calib::CalibElectron> calibElectrons;
926  //std::map< const calib::CalibElectron* , const reco::SuperCluster* > eleScMap;
927 
928  //#####################################Electron-SC association map: end#####################################################
929  for (unsigned int e_it = 0; e_it != electronCollection->size(); e_it++) {
930  calibElectrons.push_back(calib::CalibElectron(&((*electronCollection)[e_it]), hits, ehits));
931 #ifdef DEBUG
932  std::cout << calibElectrons.back().getRecoElectron()->superCluster()->energy() << " "
933  << calibElectrons.back().getRecoElectron()->energy() << std::endl;
934 #endif
935  // h1_recoEleEnergy_->Fill(calibElectrons.back().getRecoElectron()->superCluster()->energy());
936  }
937  // if (iLoop == 0)
938  //fillCalibElectrons(calibElectrons);
939 
940 #ifdef DEBUG
941  std::cout << "Filled histos" << std::endl;
942 #endif
943 
944  //COMBINATORY FOR Z MASS - begin
945  std::vector<std::pair<calib::CalibElectron*, calib::CalibElectron*> > zeeCandidates;
946  int myBestZ = -1;
947 
948  mass = -1.;
949  double DeltaMinvMin(5000.);
950 
951  if (calibElectrons.size() < 2)
952  return kContinue;
953 
954  for (unsigned int e_it = 0; e_it != calibElectrons.size() - 1; e_it++) {
955  for (unsigned int p_it = e_it + 1; p_it != calibElectrons.size(); p_it++) {
956 #ifdef DEBUG
957  std::cout << e_it << " " << calibElectrons[e_it].getRecoElectron()->charge() << " " << p_it << " "
958  << calibElectrons[p_it].getRecoElectron()->charge() << std::endl;
959 #endif
960  if (calibElectrons[e_it].getRecoElectron()->charge() * calibElectrons[p_it].getRecoElectron()->charge() != -1)
961  continue;
962 
964  std::pair<calib::CalibElectron*, calib::CalibElectron*>(&(calibElectrons[e_it]), &(calibElectrons[p_it])));
965 
966  if (mass < 0)
967  continue;
968 
969 #ifdef DEBUG
970  std::cout << "#######################mass " << mass << std::endl;
971 #endif
972 
973  zeeCandidates.push_back(
974  std::pair<calib::CalibElectron*, calib::CalibElectron*>(&(calibElectrons[e_it]), &(calibElectrons[p_it])));
975  double DeltaMinv = fabs(mass - MZ);
976 
977  if (DeltaMinv < DeltaMinvMin) {
978  DeltaMinvMin = DeltaMinv;
979  myBestZ = zeeCandidates.size() - 1;
980  }
981  }
982  }
983 
984  // h_DeltaZMassDistr_[loopFlag_]->Fill( (mass-MZ) / MZ );
985 
986  // zeeCa->Fill(zeeCandidates);
987  //
988  h1_ZCandMult_->Fill(zeeCandidates.size());
989 
990  if (zeeCandidates.empty() || myBestZ == -1)
991  return kContinue;
992 
993  if (loopFlag_ == 0)
994  myZeePlots_->fillZInfo(zeeCandidates[myBestZ]);
995 
996 #ifdef DEBUG
997  std::cout << "Found ZCandidates " << myBestZ << std::endl;
998 #endif
999 
1000  // h1_zMassResol_ ->Fill(mass-myGenZMass);
1001 
1003 
1004  int class1 = zeeCandidates[myBestZ].first->getRecoElectron()->classification();
1005  int class2 = zeeCandidates[myBestZ].second->getRecoElectron()->classification();
1006 
1007  h1_eleClasses_->Fill(class1);
1008  h1_eleClasses_->Fill(class2);
1009 
1010  std::cout << "BEFORE " << std::endl;
1011 
1012  // myZeePlots_->fillEleClassesPlots( zeeCandidates[myBestZ].first );
1013  //myZeePlots_->fillEleClassesPlots( zeeCandidates[myBestZ].second );
1014 
1015  std::cout << "AFTER " << std::endl;
1016 
1018 
1019  if (class1 < 100)
1020  // h1_Elec_->Fill(1);
1022  if (class1 >= 100)
1024 
1025  if (class2 < 100)
1027  if (class2 >= 100)
1029 
1030  if (class1 == 0)
1032  if (class1 == 100)
1034  if (class1 == 10 || class1 == 20)
1036  if (class1 == 110 || class1 == 120)
1038  if (class1 >= 30 && class1 <= 34)
1040  if (class1 >= 130 && class1 <= 134)
1042  if (class1 == 40)
1044  if (class1 == 140)
1046 
1047  if (class2 == 0)
1049  if (class2 == 100)
1051  if (class2 == 10 || class2 == 20)
1053  if (class2 == 110 || class2 == 120)
1055  if (class2 >= 30 && class2 <= 34)
1057  if (class2 >= 130 && class2 <= 134)
1059  if (class2 == 40)
1061  if (class2 == 140)
1063 
1065 
1067 
1068  DetId firstElehottestDetId =
1070  zeeCandidates[myBestZ].first->getRecoElectron()->superCluster()->seed()->hitsAndFractions(), hits, ehits)
1071  .first;
1072  DetId secondElehottestDetId =
1074  zeeCandidates[myBestZ].second->getRecoElectron()->superCluster()->seed()->hitsAndFractions(), hits, ehits)
1075  .first;
1076 
1077  bool firstElectronIsOnModuleBorder(false);
1078  bool secondElectronIsOnModuleBorder(false);
1079 
1081 
1082  if (class1 < 100) {
1083  if (firstElehottestDetId.subdetId() == EcalBarrel)
1084  firstElectronIsOnModuleBorder = xtalIsOnModuleBorder(firstElehottestDetId);
1085 
1087 
1088  if (firstElehottestDetId.subdetId() == EcalBarrel && !firstElectronIsOnModuleBorder)
1090  }
1091 
1092  if (class2 < 100) {
1093  if (secondElehottestDetId.subdetId() == EcalBarrel)
1094  secondElectronIsOnModuleBorder = xtalIsOnModuleBorder(secondElehottestDetId);
1095 
1097 
1098  if (secondElehottestDetId.subdetId() == EcalBarrel && !secondElectronIsOnModuleBorder)
1100  }
1101 
1102  if (class1 < 100) {
1103  if (firstElehottestDetId.subdetId() == EcalBarrel && firstElectronIsOnModuleBorder) {
1104  h1_borderElectronClassification_->Fill(class1);
1105  return kContinue;
1106  }
1107  }
1108 
1109  if (class2 < 100) {
1110  if (secondElehottestDetId.subdetId() == EcalBarrel && secondElectronIsOnModuleBorder) {
1111  h1_borderElectronClassification_->Fill(class2);
1112  return kContinue;
1113  }
1114  }
1115 
1118 
1119  if (class1 < 100 && class2 < 100) {
1120  BBZN++;
1121  if (class1 == 0 && class2 == 0)
1122  BBZN_gg++;
1123  if (class1 < 21 && class2 < 21)
1124  BBZN_tt++;
1125  if (class1 < 21 || class2 < 21)
1126  BBZN_t0++;
1127  }
1128 
1129  if (class1 >= 100 && class2 >= 100) {
1130  EEZN++;
1131  if (class1 == 100 && class2 == 100)
1132  EEZN_gg++;
1133  if (class1 < 121 && class2 < 121)
1134  EEZN_tt++;
1135  if (class1 < 121 || class2 < 121)
1136  EEZN_t0++;
1137  }
1138 
1139  if ((class1 < 100 && class2 >= 100) || (class2 < 100 && class1 >= 100)) {
1140  EBZN++;
1141  if ((class1 == 0 && class2 == 100) || (class2 == 0 && class1 == 100))
1142  EBZN_gg++;
1143  if ((class1 < 21 && class2 < 121) || (class2 < 21 && class1 < 121))
1144  EBZN_tt++;
1145  if (class2 < 21 || class1 < 21 || class2 < 121 || class1 < 121)
1146  EBZN_t0++;
1147  }
1148 
1150 
1151  if (myBestZ == -1)
1152  return kContinue;
1153 
1154  bool invMassBool = ((mass > minInvMassCut_) && (mass < maxInvMassCut_));
1155 
1156  bool selectionBool = false;
1157  //0 = all electrons (but no crack)
1158 
1160 
1161  float theta1 = 2. * atan(exp(-zeeCandidates[myBestZ].first->getRecoElectron()->superCluster()->eta()));
1162  bool ET_1 = ((zeeCandidates[myBestZ].first->getRecoElectron()->superCluster()->energy() * sin(theta1)) > 20.);
1163 
1164  float theta2 = 2. * atan(exp(-zeeCandidates[myBestZ].second->getRecoElectron()->superCluster()->eta()));
1165  bool ET_2 = ((zeeCandidates[myBestZ].second->getRecoElectron()->superCluster()->energy() * sin(theta2)) > 20.);
1166 
1167  bool HoE_1 = (zeeCandidates[myBestZ].first->getRecoElectron()->hadronicOverEm() < 0.115);
1168  bool HoE_2 = (zeeCandidates[myBestZ].second->getRecoElectron()->hadronicOverEm() < 0.115);
1169 
1170  bool DeltaPhiIn_1 = (zeeCandidates[myBestZ].first->getRecoElectron()->deltaPhiSuperClusterTrackAtVtx() < 0.090);
1171  bool DeltaPhiIn_2 = (zeeCandidates[myBestZ].second->getRecoElectron()->deltaPhiSuperClusterTrackAtVtx() < 0.090);
1172 
1173  bool DeltaEtaIn_1 = (zeeCandidates[myBestZ].first->getRecoElectron()->deltaEtaSuperClusterTrackAtVtx() < 0.0090);
1174  bool DeltaEtaIn_2 = (zeeCandidates[myBestZ].second->getRecoElectron()->deltaEtaSuperClusterTrackAtVtx() < 0.0090);
1175 
1177 
1178  if (!(invMassBool && ET_1 && ET_2 && HoE_1 && HoE_2 && DeltaPhiIn_1 && DeltaPhiIn_2 && DeltaEtaIn_1 && DeltaEtaIn_2))
1179  return kContinue;
1181 
1182  h1_eventsAfterEWKSelection_->Fill(1);
1183 
1185 
1186  int c1st = zeeCandidates[myBestZ].first->getRecoElectron()->classification();
1187  int c2nd = zeeCandidates[myBestZ].second->getRecoElectron()->classification();
1188  if (electronSelection_ == 0)
1189  selectionBool = (myBestZ != -1 && c1st != 40 && c1st != 40 && c2nd != 40 && c2nd != 140);
1190 
1191  //1 = all electrons are Golden, BB or Narrow
1192 
1193  if (electronSelection_ == 1)
1194  selectionBool =
1195  (myBestZ != -1 && (c1st == 0 || c1st == 10 || c1st == 20 || c1st == 100 || c1st == 110 || c1st == 120) &&
1196  (c2nd == 0 || c2nd == 10 || c2nd == 20 || c2nd == 100 || c2nd == 110 || c2nd == 120));
1197 
1198  //2 = all electrons are Golden
1199  if (electronSelection_ == 2)
1200  selectionBool = (myBestZ != -1 && (c1st == 0 || c1st == 100) && (c2nd == 0 || c2nd == 100));
1201  //3 = all electrons are showering
1202  if (electronSelection_ == 3)
1203  selectionBool = (myBestZ != -1 && ((c1st >= 30 && c1st <= 34) || ((c1st >= 130 && c1st <= 134))) &&
1204  ((c2nd >= 30 && c2nd <= 34) || ((c2nd >= 130 && c2nd <= 134)))
1205 
1206  );
1207 
1208  //4 = all Barrel electrons are Golden, BB or Narrow; take all Endcap electrons
1209 
1210  if (electronSelection_ == 4)
1211  selectionBool = (myBestZ != -1 && (
1212 
1213  ((c1st == 0 || c1st == 10 || c1st == 20) && c2nd >= 100 && c2nd != 140)
1214 
1215  ||
1216 
1217  ((c2nd == 0 || c2nd == 10 || c2nd == 20) && c1st >= 100 && c1st != 140)
1218 
1219  ));
1220 
1221  //5 = all Endcap electrons (but no crack)
1222 
1223  if (electronSelection_ == 5)
1224  selectionBool = (myBestZ != -1 && c1st >= 100 && c2nd >= 100 && c1st != 140 && c2nd != 140);
1225 
1226  //6 = all Barrel electrons (but no crack)
1227 
1228  if (electronSelection_ == 6)
1229  selectionBool = (myBestZ != -1 && c1st < 100 && c2nd < 100 && c1st != 40 && c2nd != 40);
1230 
1231  //7 = this eliminates the events which have 1 ele in the Barrel and 1 in the Endcap
1232 
1233  if (electronSelection_ == 7)
1234  selectionBool = (myBestZ != -1 && !(c1st < 100 && c2nd >= 100) && !(c1st >= 100 && c2nd < 100));
1235 
1236  float ele1EnergyCorrection(1.);
1237  float ele2EnergyCorrection(1.);
1238 
1239  if (invMassBool && selectionBool && wantEtaCorrection_) {
1240  ele1EnergyCorrection = getEtaCorrection(zeeCandidates[myBestZ].first->getRecoElectron());
1241  ele2EnergyCorrection = getEtaCorrection(zeeCandidates[myBestZ].second->getRecoElectron());
1242  }
1243 
1244  if (invMassBool && selectionBool) {
1246  ZeeKinematicTools::cosThetaElectrons_SC(zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1248  ZeeKinematicTools::cosThetaElectrons_TK(zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1250  ZeeKinematicTools::cosThetaElectrons_SC(zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection) /
1252  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection) -
1253  1.);
1254 
1255  if (!mcProducer_.empty()) {
1256  h1_zMassResol_->Fill(mass - myGenZMass);
1257 
1258  //reco-mc association map - begin
1259 
1260  std::map<HepMC::GenParticle*, const reco::GsfElectron*> myMCmap;
1261 
1262  std::vector<const reco::GsfElectron*> dauElectronCollection;
1263 
1264  dauElectronCollection.push_back(zeeCandidates[myBestZ].first->getRecoElectron());
1265  dauElectronCollection.push_back(zeeCandidates[myBestZ].second->getRecoElectron());
1266 
1267  fillMCmap(&dauElectronCollection, mcEle, myMCmap);
1268  fillEleInfo(mcEle, myMCmap);
1269  //h_DiffZMassDistr_[loopFlag_]->Fill( (mass-myGenZMass) );
1270  }
1271 
1272  //PUT f(eta) IN OUR Zee ALGORITHM
1273  theAlgorithm_->addEvent(zeeCandidates[myBestZ].first,
1274  zeeCandidates[myBestZ].second,
1275  MZ * sqrt(ele1EnergyCorrection * ele2EnergyCorrection));
1276 
1277  h1_reco_ZMass_->Fill(ZeeKinematicTools::calculateZMass_withTK(zeeCandidates[myBestZ]));
1278 
1280  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1281 
1282  int c1st = zeeCandidates[myBestZ].first->getRecoElectron()->classification();
1283  int c2nd = zeeCandidates[myBestZ].second->getRecoElectron()->classification();
1284  if (c1st < 100 && c2nd < 100)
1286  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1287 
1288  if (c1st >= 100 && c2nd >= 100)
1290  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1291 
1293  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection);
1294 
1296  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection) -
1297  myGenZMass;
1298 
1299  // h_ZMassDistr_[loopFlag_]->Fill(ZeeKinematicTools::calculateZMassWithCorrectedElectrons_withTK(zeeCandidates[myBestZ],ele1EnergyCorrection,ele2EnergyCorrection));
1300 
1301  myTree->Fill();
1302  }
1303 
1304 #ifdef DEBUG
1305  std::cout << "Added event to algorithm" << std::endl;
1306 #endif
1307 
1308  return kContinue;
1309 }

References funct::abs(), edm::HLTGlobalStatus::accept(), ZIterativeAlgorithmWithFit::addEvent(), aHLTResults, BARREL_ELECTRONS_AFTER_BORDER_CUT, BARREL_ELECTRONS_BEFORE_BORDER_CUT, barrelfile_, BBZN, BBZN_gg, BBZN_t0, BBZN_tt, bookHistograms(), ZeeKinematicTools::calculateZMass_withTK(), ZeeKinematicTools::calculateZMassWithCorrectedElectrons_withTK(), calibCoeff, calibCoeffError, calibMode_, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, ALCARECOTkAlJpsiMuMu_cff::charge, ZeeKinematicTools::cosThetaElectrons_SC(), ZeeKinematicTools::cosThetaElectrons_TK(), gather_cfg::cout, CRACK_ELECTRONS_IN_BARREL, CRACK_ELECTRONS_IN_ENDCAP, EBZN, EBZN_gg, EBZN_t0, EBZN_tt, EcalBarrel, EcalEndcap, EEZN, EEZN_gg, EEZN_t0, EEZN_tt, pdwgLeptonRecoSkim_cfi::electronCollection, electronCollection_, electronProducer_, electronSelection_, edm::SortedCollection< T, SORT >::empty(), endcapfile_, erechitCollection_, erechitProducer_, PVValHelper::eta, cppFunctionSkipper::exception, JetChargeProducer_cfi::exp, ZeePlots::fillEleInfo(), fillEleInfo(), ZeePlots::fillEleMCInfo(), ZeePlots::fillHLTInfo(), fillMCmap(), ZeePlots::fillZInfo(), ZeePlots::fillZMCInfo(), EcalCondObjectContainer< T >::find(), first, dqmMemoryStats::float, GenParticle::GenParticle, edm::EventSetup::get(), CaloMiscalibMapEcal::get(), get, EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInModule(), EcalRingCalibrationTools::getDetIdsInRing(), getEtaCorrection(), edm::HepMCProduct::GetEvent(), getHottestDetId(), EcalCondObjectContainer< T >::getMap(), ZIterativeAlgorithmWithFit::getNumberOfChannels(), GOLDEN_ELECTRONS_IN_BARREL, GOLDEN_ELECTRONS_IN_ENDCAP, h1_borderElectronClassification_, h1_eleClasses_, h1_electronCosTheta_SC_, h1_electronCosTheta_SC_TK_, h1_electronCosTheta_TK_, h1_eventsAfterBorderSelection_, h1_eventsAfterEWKSelection_, h1_eventsBeforeBorderSelection_, h1_eventsBeforeEWKSelection_, h1_reco_ZMass_, h1_reco_ZMassCorr_, h1_reco_ZMassCorrBB_, h1_reco_ZMassCorrEE_, h1_ZCandMult_, h1_zMassResol_, h2_xtalMiscalibCoeffBarrel_, h2_xtalMiscalibCoeffEndcapMinus_, h2_xtalMiscalibCoeffEndcapPlus_, hfClusterShapes_cfi::hits, hltCount, hlTriggerResults_, mps_fire::i, ical, EBDetId::ieta(), iEvent, init_, initCalibCoeff, EBDetId::iphi(), isfirstcall_, edm::HandleBase::isValid(), EEDetId::ix(), EEDetId::iy(), dqmdumpme::k, edm::EDLooperBase::kContinue, loopFlag_, mass, mass4tree, massDiff4tree, maxInvMassCut_, mcProducer_, MCZBB, MCZEB, MCZEE, minInvMassCut_, myTree, myZeePlots_, MZ, NEVT, outputFile_, AlCaHLTBitMon_ParallelJobs::p, MiscalibReaderFromXML::parseXMLMiscalibFile(), phits, CaloMiscalibMapEcal::prefillMap(), edm::Handle< T >::product(), read_events, rechitCollection_, rechitProducer_, cleanAndMergeSuperClusters_cfi::scCollection, scCollection_, scIslandCollection_, scIslandProducer_, scProducer_, edm::second(), EcalRingCalibrationTools::setCaloGeometry(), SHOWER_ELECTRONS_IN_BARREL, SHOWER_ELECTRONS_IN_ENDCAP, SILVER_ELECTRONS_IN_BARREL, SILVER_ELECTRONS_IN_ENDCAP, funct::sin(), edm::HLTGlobalStatus::size(), mathSSE::sqrt(), DetId::subdetId(), theAlgorithm_, TOTAL_ELECTRONS_IN_BARREL, TOTAL_ELECTRONS_IN_ENDCAP, wantEtaCorrection_, xtalIsOnModuleBorder(), and EEDetId::zside().

◆ endOfJob()

void ZeeCalibration::endOfJob ( )
overridevirtual

Called at end of job.

if not ETA_ET MODE - begin

if not ETA_ET MODE - end

Reimplemented from edm::EDLooperBase.

Definition at line 172 of file ZeeCalibration.cc.

172  {
173  printStatistics();
174 
175  if (calibMode_ != "ETA_ET_MODE") {
177 
178  //Writing out calibration coefficients
179  calibXMLwriter* barrelWriter = new calibXMLwriter(EcalBarrel);
180  for (int ieta = -EBDetId::MAX_IETA; ieta <= EBDetId::MAX_IETA; ++ieta) {
181  if (ieta == 0)
182  continue;
183  for (int iphi = EBDetId::MIN_IPHI; iphi <= EBDetId::MAX_IPHI; ++iphi) {
184  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
185  if (EBDetId::validDetId(ieta, iphi)) {
186  EBDetId ebid(ieta, iphi);
187  barrelWriter->writeLine(ebid, *(ical->getMap().find(ebid.rawId())));
188  }
189  }
190  }
191 
192  calibXMLwriter* endcapWriter = new calibXMLwriter(EcalEndcap);
193  for (int iX = EEDetId::IX_MIN; iX <= EEDetId::IX_MAX; ++iX) {
194  for (int iY = EEDetId::IY_MIN; iY <= EEDetId::IY_MAX; ++iY) {
195  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
196  if (EEDetId::validDetId(iX, iY, 1)) {
197  EEDetId eeid(iX, iY, 1);
198  endcapWriter->writeLine(eeid, *(ical->getMap().find(eeid.rawId())));
199  }
200  if (EEDetId::validDetId(iX, iY, -1)) {
201  EEDetId eeid(iX, iY, -1);
202  endcapWriter->writeLine(eeid, *(ical->getMap().find(eeid.rawId())));
203  }
204  }
205  }
206 
207  }
208 
209  std::cout << "Writing histos..." << std::endl;
210  outputFile_->cd();
211 
212  // zeeplts->Write();
213 
216 
219 
221 
225 
226  h1_electronCosTheta_SC_->Write();
227  h1_electronCosTheta_TK_->Write();
229 
230  h1_zMassResol_->Write();
231  h1_zEtaResol_->Write();
232  h1_zPhiResol_->Write();
233  h1_eleEtaResol_->Write();
234  h1_elePhiResol_->Write();
235  h1_seedOverSC_->Write();
236  h1_preshowerOverSC_->Write();
237 
238  for (unsigned int i = 0; i < 25; i++) {
239  if (i < theMaxLoops) {
240  h_ESCEtrueVsEta_[i]->Write();
241  h_ESCEtrue_[i]->Write();
242 
243  h_ESCcorrEtrueVsEta_[i]->Write();
244  h_ESCcorrEtrue_[i]->Write();
245 
246  h2_chi2_[i]->Write();
247  h2_iterations_[i]->Write();
248 
249  // h_DiffZMassDistr_[i]->Write();
250 
251  //h_ZMassDistr_[i]->Write();
252  }
253  }
254 
255  h2_fEtaBarrelGood_->Write();
256  h2_fEtaBarrelBad_->Write();
257  h2_fEtaEndcapGood_->Write();
258  h2_fEtaEndcapBad_->Write();
259  h1_eleClasses_->Write();
260 
261  h_eleEffEta_[0]->Write();
262  h_eleEffPhi_[0]->Write();
263  h_eleEffPt_[0]->Write();
264 
265  h_eleEffEta_[1]->Write();
266  h_eleEffPhi_[1]->Write();
267  h_eleEffPt_[1]->Write();
268 
269  int j = 0;
270 
271  int flag = 0;
272 
273  Double_t mean[25] = {0.};
274  Double_t num[25] = {0.};
275  Double_t meanErr[25] = {0.};
276  Float_t rms[25] = {0.};
277  Float_t tempRms[10][25];
278 
279  for (int ia = 0; ia < 10; ia++) {
280  for (int ib = 0; ib < 25; ib++) {
281  tempRms[ia][ib] = 0.;
282  }
283  }
284 
285  int aa = 0;
286 
287  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
289  bool isNearCrack = false;
290 
291  if (calibMode_ == "RING") {
292  isNearCrack = (abs(ringNumberCorrector(k)) == 1 || abs(ringNumberCorrector(k)) == 25 ||
293  abs(ringNumberCorrector(k)) == 26 || abs(ringNumberCorrector(k)) == 45 ||
294  abs(ringNumberCorrector(k)) == 46 || abs(ringNumberCorrector(k)) == 65 ||
295  abs(ringNumberCorrector(k)) == 66 || abs(ringNumberCorrector(k)) == 85 ||
296  abs(ringNumberCorrector(k)) == 86 || abs(ringNumberCorrector(k)) == 124);
297  }
298 
299  if (k < 85) {
300  if ((k + 1) % 5 != 0) {
301  if (!isNearCrack) {
302  mean[j] += calibCoeff[k];
303  mean[j] += calibCoeff[169 - k];
304 
305  num[j] += 2.;
306 
307  //meanErr[j]+= calibCoeffError[k];
308  //meanErr[j]+= calibCoeffError[169 - k];
309 
310  meanErr[j] += 1. / pow(calibCoeffError[k], 2);
311  meanErr[j] += 1. / pow(calibCoeffError[169 - k], 2);
312 
313  tempRms[aa][j] += calibCoeff[k];
314  aa++;
315  tempRms[aa][j] += calibCoeff[169 - k];
316  aa++;
317  }
318  }
319 
320  else {
321  if (!isNearCrack) {
322  mean[j] += calibCoeff[k];
323  mean[j] += calibCoeff[169 - k];
324 
325  num[j] += 2.;
326 
327  //meanErr[j]+= calibCoeffError[k];
328  //meanErr[j]+= calibCoeffError[169 - k];
329 
330  meanErr[j] += 1. / pow(calibCoeffError[k], 2);
331  meanErr[j] += 1. / pow(calibCoeffError[169 - k], 2);
332 
333  tempRms[aa][j] += calibCoeff[k];
334  aa++;
335  tempRms[aa][j] += calibCoeff[169 - k];
336  aa++;
337  }
338  j++;
339  aa = 0;
340  }
341  }
342  //EE begin
343 
344  if (k >= 170 && k <= 204) {
345  if (flag < 4) {
346  //make groups of 5 Xtals in #eta
347  mean[j] += calibCoeff[k] / 10.;
348  mean[j] += calibCoeff[k + 39] / 10.;
349 
350  meanErr[j] += calibCoeffError[k] / 30.;
351  meanErr[j] += calibCoeffError[k + 39] / 30.;
352 
353  tempRms[aa][j] += calibCoeff[k];
354  aa++;
355  tempRms[aa][j] += calibCoeff[k + 39];
356  aa++;
357 
358  flag++;
359  }
360 
361  else if (flag == 4) {
362  //make groups of 5 Xtals in #eta
363  mean[j] += calibCoeff[k] / 10.;
364  mean[j] += calibCoeff[k + 39] / 10.;
365 
366  meanErr[j] += calibCoeffError[k] / 30.;
367  meanErr[j] += calibCoeffError[k + 39] / 30.;
368 
369  tempRms[aa][j] += calibCoeff[k];
370  aa++;
371  tempRms[aa][j] += calibCoeff[k + 39];
372  aa++;
373 
374  flag = 0;
375  // std::cout<<" index(>85) "<<k<<" j is "<<j<<" mean[j] is "<<mean[j]<<std::endl;
376  j++;
377  aa = 0;
378  }
379  }
380  if (k >= 205 && k <= 208) {
381  mean[j] += calibCoeff[k] / 8.;
382  mean[j] += calibCoeff[k + 39] / 8.;
383 
384  meanErr[j] += calibCoeffError[k] / 30.;
385  meanErr[j] += calibCoeffError[k + 39] / 30.;
386 
387  tempRms[aa][j] += calibCoeff[k];
388  aa++;
389  tempRms[aa][j] += calibCoeff[k + 39];
390  aa++;
391  }
392  //EE end
393 
394  /*
395  for(int jj =0; jj< 25; jj++){
396  if(meanErr[jj] > 0.)
397  std::cout<<" meanErr[jj] before sqrt: "<<meanErr[jj]<<std::endl;
398 
399  meanErr[jj] = 1./sqrt( meanErr[jj] );
400 
401  std::cout<<" meanErr[jj] after sqrt: "<<meanErr[jj]<<std::endl;
402  }
403  */
404 
405  if (!isNearCrack) {
408  h1_mc_->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
409 
410  if (k < 170) {
412  h1_mcEB_->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
413  }
414 
415  if (k >= 170) {
417  h1_mcEE_->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
418  }
419  }
420  }
421 
422  for (int ic = 0; ic < 17; ic++) {
423  mean[ic] = mean[ic] / num[ic]; //find mean of recalib coeff on group of rings
424  //meanErr[ic] = meanErr[ic] / ( sqrt( num[ic] ) * num[ic] ); //find mean of recalib coeff on group of rings
425  meanErr[ic] = 1. / sqrt(meanErr[ic]); //find mean of recalib coeff on group of rings
426  }
427 
428  //build array of RMS
429  for (int ic = 0; ic < 25; ic++) {
430  for (int id = 0; id < 10; id++) {
431  if (tempRms[id][ic] > 0.) {
432  rms[ic] += (tempRms[id][ic] - mean[j]) * (tempRms[id][ic] - mean[j]);
433  }
434  }
435  rms[ic] /= 10.; //this is approximate
436  rms[ic] = sqrt(rms[ic]);
437  }
438 
439  //build array of RMS
440 
441  Double_t xtalEta[25] = {1.4425, 1.3567, 1.2711, 1.1855, 1.10, 1.01, 0.92, 0.83, 0.7468,
442  0.6612, 0.5756, 0.4897, 0.3985, 0.3117, 0.2250, 0.1384, 0.0487, 1.546,
443  1.651, 1.771, 1.908, 2.071, 2.267, 2.516, 2.8};
444 
445  Double_t zero[25] = {0.026}; //interval/sqrt(12)
446 
447  for (int j = 0; j < 25; j++)
448  h2_coeffVsEtaGrouped_->Fill(xtalEta[j], mean[j]);
449 
450  // for(int sho = 0; sho <25; sho++)
451  //cout<<"xtalEta[j] "<< xtalEta[sho]<<" mean[j] "<<mean[sho]<<" err[j] "<<meanErr[sho]<<std::endl;
452 
453  TProfile* px = h2_coeffVsEta_->ProfileX("coeffVsEtaProfile");
454  px->SetXTitle("Eta channel");
455  px->SetYTitle("recalibCoeff");
456  px->Write();
457 
458  h2_coeffVsEta_->Write();
459  h2_coeffVsEtaGrouped_->Write();
460  h2_zMassVsLoop_->Write();
461  h2_zMassDiffVsLoop_->Write();
462  h2_zWidthVsLoop_->Write();
463  h2_coeffVsLoop_->Write();
464  h2_miscalRecal_->Write();
465  h1_mc_->Write();
466  h2_miscalRecalEB_->Write();
467  h1_mcEB_->Write();
468  h2_miscalRecalEE_->Write();
469  h1_mcEE_->Write();
470 
471  h2_residualSigma_->Write();
472 
474 
475  double weightSumMeanBarrel = 0.;
476  double weightSumMeanEndcap = 0.;
477 
478  for (int iIteration = 0; iIteration < theAlgorithm_->getNumberOfIterations(); iIteration++)
479  for (int iChannel = 0; iChannel < theAlgorithm_->getNumberOfChannels(); iChannel++) {
480  if (iIteration == (theAlgorithm_->getNumberOfIterations() - 1)) {
481  if (iChannel < 170)
482  weightSumMeanBarrel += algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral() / 170.;
483 
484  if (iChannel >= 170)
485  weightSumMeanEndcap += algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral() / 78.;
486 
487  h1_occupancyVsEta_->Fill((Double_t)ringNumberCorrector(iChannel),
488  algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral());
489 
490  h1_occupancy_->Fill(algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral());
491 
492  if (iChannel < 170)
493  h1_occupancyBarrel_->Fill(algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral());
494 
495  if (iChannel >= 170)
496  h1_occupancyEndcap_->Fill(algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral());
497 
498 #ifdef DEBUG
499  std::cout << "Writing weighted integral for channel " << ringNumberCorrector(iChannel) << " ,value "
500  << algoHistos->weightedRescaleFactor[iIteration][iChannel]->Integral() << std::endl;
501 #endif
502  }
503  }
504 
505  // std::cout<<"Done! Closing output file... "<<std::endl;
506 
507  h1_weightSumMeanBarrel_->Fill(weightSumMeanBarrel);
508  h1_weightSumMeanEndcap_->Fill(weightSumMeanEndcap);
509 
510  std::cout << "Weight sum mean on channels in Barrel is :" << weightSumMeanBarrel << std::endl;
511  std::cout << "Weight sum mean on channels in Endcap is :" << weightSumMeanEndcap << std::endl;
512 
513  h1_weightSumMeanBarrel_->Write();
514  h1_weightSumMeanEndcap_->Write();
515 
516  h1_occupancyVsEta_->Write();
517  h1_occupancy_->Write();
518  h1_occupancyBarrel_->Write();
519  h1_occupancyEndcap_->Write();
520 
521  myTree->Write();
522 
523  TGraphErrors* graph = new TGraphErrors(25, xtalEta, mean, zero, meanErr);
524  graph->Draw("APL");
525  graph->Write();
526 
527  double zero50[50] = {0.};
528 
529  TGraphErrors* residualSigmaGraph = new TGraphErrors(50, loopArray, sigmaArray, zero50, sigmaErrorArray);
530  residualSigmaGraph->SetName("residualSigmaGraph");
531  residualSigmaGraph->Draw("APL");
532  residualSigmaGraph->Write();
533 
534  TGraphErrors* coefficientDistanceAtIterationGraph =
535  new TGraphErrors(50, loopArray, coefficientDistanceAtIteration, zero50, zero50);
536  coefficientDistanceAtIterationGraph->SetName("coefficientDistanceAtIterationGraph");
537  coefficientDistanceAtIterationGraph->Draw("APL");
538  coefficientDistanceAtIterationGraph->Write();
539 
540  Float_t noError[250] = {0.};
541 
542  Float_t ringInd[250];
543  for (int i = 0; i < 250; i++)
544  ringInd[i] = ringNumberCorrector(i);
545 
546  TGraphErrors* graphCoeff =
547  new TGraphErrors(theAlgorithm_->getNumberOfChannels(), ringInd, calibCoeff, noError, calibCoeffError);
548  graphCoeff->SetName("graphCoeff");
549  graphCoeff->Draw("APL");
550  graphCoeff->Write();
551 
552  // outputFile_->Write();//this automatically writes all histos on file
553 
554  h1_ZCandMult_->Write();
555  h1_reco_ZMass_->Write();
556 
557  h1_reco_ZMassCorr_->Write();
558  h1_reco_ZMassCorrBB_->Write();
559  h1_reco_ZMassCorrEE_->Write();
560 
561  outputFile_->Close();
562 
567 
568  // myZeeRescaleFactorPlots_ = new ZeeRescaleFactorPlots("zeeRescaleFactorPlots.root");
569  //myZeeRescaleFactorPlots_->writeHistograms( theAlgorithm_ );
570 
571  // delete myZeeRescaleFactorPlots_;
572 }

References funct::abs(), calibCoeff, calibCoeffError, calibMode_, coefficientDistanceAtIteration, gather_cfg::cout, EcalBarrel, EcalEndcap, RemoveAddSevLevel::flag, ZIterativeAlgorithmWithFit::getHistos(), ZIterativeAlgorithmWithFit::getNumberOfChannels(), ZIterativeAlgorithmWithFit::getNumberOfIterations(), h1_borderElectronClassification_, h1_eleClasses_, h1_electronCosTheta_SC_, h1_electronCosTheta_SC_TK_, h1_electronCosTheta_TK_, h1_eleEtaResol_, h1_elePhiResol_, h1_eventsAfterBorderSelection_, h1_eventsAfterEWKSelection_, h1_eventsBeforeBorderSelection_, h1_eventsBeforeEWKSelection_, h1_mc_, h1_mcEB_, h1_mcEE_, h1_occupancy_, h1_occupancyBarrel_, h1_occupancyEndcap_, h1_occupancyVsEta_, h1_preshowerOverSC_, h1_reco_ZMass_, h1_reco_ZMassCorr_, h1_reco_ZMassCorrBB_, h1_reco_ZMassCorrEE_, h1_seedOverSC_, h1_weightSumMeanBarrel_, h1_weightSumMeanEndcap_, h1_ZCandMult_, h1_zEtaResol_, h1_zMassResol_, h1_zPhiResol_, h2_chi2_, h2_coeffVsEta_, h2_coeffVsEtaGrouped_, h2_coeffVsLoop_, h2_fEtaBarrelBad_, h2_fEtaBarrelGood_, h2_fEtaEndcapBad_, h2_fEtaEndcapGood_, h2_iterations_, h2_miscalRecal_, h2_miscalRecalEB_, h2_miscalRecalEE_, h2_residualSigma_, h2_xtalMiscalibCoeffBarrel_, h2_xtalMiscalibCoeffEndcapMinus_, h2_xtalMiscalibCoeffEndcapPlus_, h2_zMassDiffVsLoop_, h2_zMassVsLoop_, h2_zWidthVsLoop_, h_eleEffEta_, h_eleEffPhi_, h_eleEffPt_, h_ESCcorrEtrue_, h_ESCcorrEtrueVsEta_, h_ESCEtrue_, h_ESCEtrueVsEta_, mps_fire::i, cuy::ib, ical, triggerObjects_cff::id, LEDCalibrationChannels::ieta, initCalibCoeff, LEDCalibrationChannels::iphi, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, dqmiolumiharvest::j, dqmdumpme::k, loopArray, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, SiStripPI::mean, EBDetId::MIN_IPHI, myTree, myZeePlots_, EgammaValidation_cff::num, outputFile_, funct::pow(), printStatistics(), multPhiCorr_741_25nsDY_cfi::px, DetId::rawId(), ringNumberCorrector(), SiStripPI::rms, sigmaArray, sigmaErrorArray, mathSSE::sqrt(), theAlgorithm_, theMaxLoops, EBDetId::validDetId(), EEDetId::validDetId(), ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots::weightedRescaleFactor, ZeePlots::writeEleHistograms(), calibXMLwriter::writeLine(), ZeePlots::writeMCEleHistograms(), ZeePlots::writeMCZHistograms(), ZeePlots::writeZHistograms(), and SiPixelPI::zero.

◆ endOfLoop()

edm::EDLooper::Status ZeeCalibration::endOfLoop ( const edm::EventSetup iSetup,
unsigned int  iLoop 
)
overridevirtual

Called at end of loop.

Implements edm::EDLooperBase.

Definition at line 1328 of file ZeeCalibration.cc.

1328  {
1329  double par[3];
1330  double errpar[3];
1331  double zChi2;
1332  int zIters;
1333 
1334  ZIterativeAlgorithmWithFit::gausfit(h1_reco_ZMass_, par, errpar, 2., 2., &zChi2, &zIters);
1335 
1336  h2_zMassVsLoop_->Fill(loopFlag_, par[1]);
1337 
1338  h2_zMassDiffVsLoop_->Fill(loopFlag_, (par[1] - MZ) / MZ);
1339 
1340  h2_zWidthVsLoop_->Fill(loopFlag_, par[2]);
1341 
1343 
1344  std::cout << "[ZeeCalibration] Ending loop " << iLoop << std::endl;
1345  //RUN the algorithm
1347 
1348  const std::vector<float>& optimizedCoefficients = theAlgorithm_->getOptimizedCoefficients();
1349  const std::vector<float>& optimizedCoefficientsError = theAlgorithm_->getOptimizedCoefficientsError();
1350  //const std::vector<float>& weightSum = theAlgorithm_->getWeightSum();
1351  const std::vector<float>& optimizedChi2 = theAlgorithm_->getOptimizedChiSquare();
1352  const std::vector<int>& optimizedIterations = theAlgorithm_->getOptimizedIterations();
1353 
1354  //#ifdef DEBUG
1355  std::cout << "Optimized coefficients " << optimizedCoefficients.size() << std::endl;
1356  //#endif
1357 
1358  // h2_coeffVsLoop_->Fill(loopFlag_, optimizedCoefficients[75]); //show the evolution of just 1 ring coefficient (well chosen...)
1359 
1361  for (unsigned int ieta = 0; ieta < optimizedCoefficients.size(); ieta++) {
1362  NewCalibCoeff[ieta] = calibCoeff[ieta] * optimizedCoefficients[ieta];
1363 
1364  h2_chi2_[loopFlag_]->Fill(ringNumberCorrector(ieta), optimizedChi2[ieta]);
1365  h2_iterations_[loopFlag_]->Fill(ringNumberCorrector(ieta), optimizedIterations[ieta]);
1366  }
1368 
1370  computeCoefficientDistanceAtIteration(calibCoeff, NewCalibCoeff, optimizedCoefficients.size());
1371 
1372  std::cout << "Iteration # : " << loopFlag_ << " CoefficientDistanceAtIteration "
1373  << coefficientDistanceAtIteration[loopFlag_] << std::endl;
1374  std::cout << "size " << optimizedCoefficients.size() << std::endl;
1375 
1376  for (unsigned int ieta = 0; ieta < optimizedCoefficients.size(); ieta++) {
1377  calibCoeff[ieta] *= optimizedCoefficients[ieta];
1379  calibCoeff[ieta] * sqrt(pow(optimizedCoefficientsError[ieta] / optimizedCoefficients[ieta], 2) +
1381  //calibCoeffError[ieta] = optimizedCoefficientsError[ieta];
1382 
1383 #ifdef DEBUG
1384  std::cout << ieta << " " << optimizedCoefficients[ieta] << std::endl;
1385 #endif
1386 
1387  std::vector<DetId> ringIds;
1388 
1389  if (calibMode_ == "RING")
1391 
1392  if (calibMode_ == "MODULE")
1394 
1395  if (calibMode_ == "ABS_SCALE" || calibMode_ == "ETA_ET_MODE")
1397 
1398  for (unsigned int iid = 0; iid < ringIds.size(); ++iid) {
1399  if (ringIds[iid].subdetId() == EcalBarrel) {
1400  EBDetId myEBDetId(ringIds[iid]);
1401  h2_xtalRecalibCoeffBarrel_[loopFlag_]->SetBinContent(
1402  myEBDetId.ieta() + 86,
1403  myEBDetId.iphi(),
1404  100 * (calibCoeff[ieta] * initCalibCoeff[ieta] - 1.)); //fill TH2 with recalibCoeff
1405  }
1406 
1407  if (ringIds[iid].subdetId() == EcalEndcap) {
1408  EEDetId myEEDetId(ringIds[iid]);
1409  if (myEEDetId.zside() < 0)
1411  myEEDetId.ix(),
1412  myEEDetId.iy(),
1413  100 * (calibCoeff[ieta] * initCalibCoeff[ieta] - 1.)); //fill TH2 with recalibCoeff
1414 
1415  if (myEEDetId.zside() > 0)
1416  h2_xtalRecalibCoeffEndcapPlus_[loopFlag_]->SetBinContent(
1417  myEEDetId.ix(),
1418  myEEDetId.iy(),
1419  100 * (calibCoeff[ieta] * initCalibCoeff[ieta] - 1.)); //fill TH2 with recalibCoeff
1420  }
1421 
1422  ical->setValue(ringIds[iid], *(ical->getMap().find(ringIds[iid])) * optimizedCoefficients[ieta]);
1423  }
1424  }
1425 
1427 
1428  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
1429  bool isNearCrack =
1430  (abs(ringNumberCorrector(k)) == 1 || abs(ringNumberCorrector(k)) == 25 || abs(ringNumberCorrector(k)) == 26 ||
1431  abs(ringNumberCorrector(k)) == 45 || abs(ringNumberCorrector(k)) == 46 || abs(ringNumberCorrector(k)) == 65 ||
1432  abs(ringNumberCorrector(k)) == 66 || abs(ringNumberCorrector(k)) == 85 || abs(ringNumberCorrector(k)) == 86 ||
1433  abs(ringNumberCorrector(k)) == 124);
1434 
1435  if (!isNearCrack) {
1436  // h2_miscalRecalParz_[iLoop]->Fill( initCalibCoeff[k], 1./calibCoeff[k] );
1437  h1_mcParz_[iLoop]->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
1438 
1439  if (k < 170) {
1440  //h2_miscalRecalEBParz_[iLoop]->Fill( initCalibCoeff[k], 1./calibCoeff[k] );
1441  h1_mcEBParz_[iLoop]->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
1442  }
1443 
1444  if (k >= 170) {
1445  //h2_miscalRecalEEParz_[iLoop]->Fill( initCalibCoeff[k], 1./calibCoeff[k] );
1446  h1_mcEEParz_[iLoop]->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
1447  }
1448  }
1449  }
1450 
1452  double parResidual[3];
1453  double errparResidual[3];
1454  double zResChi2;
1455  int zResIters;
1456 
1457  ZIterativeAlgorithmWithFit::gausfit(h1_mcParz_[iLoop], parResidual, errparResidual, 3., 3., &zResChi2, &zResIters);
1458  //h1_mcParz_[iLoop]->Fit("gaus");
1459 
1460  h2_residualSigma_->Fill(loopFlag_ + 1, parResidual[2]);
1461  loopArray[loopFlag_] = loopFlag_ + 1;
1462  sigmaArray[loopFlag_] = parResidual[2];
1463  sigmaErrorArray[loopFlag_] = errparResidual[2];
1464 
1465  std::cout << "Fit on residuals, sigma is " << parResidual[2] << " +/- " << errparResidual[2] << std::endl;
1466 
1468  outputFile_->cd();
1469 
1470  // h2_miscalRecalParz_[iLoop]->Write();
1471  h1_mcParz_[iLoop]->Write();
1472 
1473  //h2_miscalRecalEBParz_[iLoop]->Write();
1474  h1_mcEBParz_[iLoop]->Write();
1475 
1476  //h2_miscalRecalEEParz_[iLoop]->Write();
1477  h1_mcEEParz_[iLoop]->Write();
1481 
1483 
1484  loopFlag_++;
1485 
1486 #ifdef DEBUG
1487  std::cout << " loopFlag_ is " << loopFlag_ << std::endl;
1488 #endif
1489 
1490  if (iLoop == theMaxLoops - 1 || iLoop >= theMaxLoops)
1491  return kStop;
1492  else
1493  return kContinue;
1494 }

References funct::abs(), calibCoeff, calibCoeffError, calibMode_, coefficientDistanceAtIteration, computeCoefficientDistanceAtIteration(), gather_cfg::cout, EcalBarrel, EcalEndcap, ZIterativeAlgorithmWithFit::gausfit(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInModule(), EcalRingCalibrationTools::getDetIdsInRing(), ZIterativeAlgorithmWithFit::getNumberOfChannels(), ZIterativeAlgorithmWithFit::getOptimizedChiSquare(), ZIterativeAlgorithmWithFit::getOptimizedCoefficients(), ZIterativeAlgorithmWithFit::getOptimizedCoefficientsError(), ZIterativeAlgorithmWithFit::getOptimizedIterations(), h1_mcEBParz_, h1_mcEEParz_, h1_mcParz_, h1_reco_ZMass_, h2_chi2_, h2_iterations_, h2_residualSigma_, h2_xtalRecalibCoeffBarrel_, h2_xtalRecalibCoeffEndcapMinus_, h2_xtalRecalibCoeffEndcapPlus_, h2_zMassDiffVsLoop_, h2_zMassVsLoop_, h2_zWidthVsLoop_, ical, EBDetId::ieta(), LEDCalibrationChannels::ieta, initCalibCoeff, EBDetId::iphi(), ZIterativeAlgorithmWithFit::iterate(), EEDetId::ix(), EEDetId::iy(), dqmdumpme::k, edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, loopArray, loopFlag_, MZ, NewCalibCoeff, outputFile_, funct::pow(), ringNumberCorrector(), sigmaArray, sigmaErrorArray, mathSSE::sqrt(), theAlgorithm_, theMaxLoops, and EEDetId::zside().

◆ EvalDPhi()

float ZeeCalibration::EvalDPhi ( float  Phi,
float  Phi_ref 
)
private

Definition at line 1852 of file ZeeCalibration.cc.

1852  {
1853  if (Phi < 0)
1854  Phi = 2 * TMath::Pi() + Phi;
1855  if (Phi_ref < 0)
1856  Phi_ref = 2 * TMath::Pi() + Phi_ref;
1857  return (Phi - Phi_ref);
1858 }

References VtxSmearedParameters_cfi::Phi, and Pi.

◆ EvalDR()

float ZeeCalibration::EvalDR ( float  Eta,
float  Eta_ref,
float  Phi,
float  Phi_ref 
)
private

Definition at line 1837 of file ZeeCalibration.cc.

1837  {
1838  if (Phi < 0)
1839  Phi = 2 * TMath::Pi() + Phi;
1840  if (Phi_ref < 0)
1841  Phi_ref = 2 * TMath::Pi() + Phi_ref;
1842  float DPhi = Phi - Phi_ref;
1843  if (fabs(DPhi) > TMath::Pi())
1844  DPhi = 2 * TMath::Pi() - fabs(DPhi);
1845 
1846  float DEta = Eta - Eta_ref;
1847 
1848  float DR = sqrt(DEta * DEta + DPhi * DPhi);
1849  return DR;
1850 }

References mitigatedMETSequence_cff::DPhi, VtxSmearedParameters_cfi::Phi, Pi, and mathSSE::sqrt().

Referenced by fillMCmap().

◆ fEtaBarrelBad()

double ZeeCalibration::fEtaBarrelBad ( double  scEta) const
private

Definition at line 1773 of file ZeeCalibration.cc.

1773  {
1774  float p0 = 1.00153e+00;
1775  float p1 = 3.29331e-02;
1776  float p2 = 1.21187e-03;
1777 
1778  double x = (double)fabs(scEta);
1779 
1780  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1781 }

References p1, p2, and x.

Referenced by getEtaCorrection().

◆ fEtaBarrelGood()

double ZeeCalibration::fEtaBarrelGood ( double  scEta) const
private

Definition at line 1805 of file ZeeCalibration.cc.

1805  {
1806  float p0 = 9.99782e-01;
1807  float p1 = 1.26983e-02;
1808  float p2 = 2.16344e-03;
1809 
1810  double x = (double)fabs(scEta);
1811 
1812  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1813 }

References p1, p2, and x.

Referenced by getEtaCorrection().

◆ fEtaEndcapBad()

double ZeeCalibration::fEtaEndcapBad ( double  scEta) const
private

Definition at line 1795 of file ZeeCalibration.cc.

1795  {
1796  float p0 = 1.17382e+00;
1797  float p1 = -6.52319e-02;
1798  float p2 = 6.26108e-03;
1799 
1800  double x = (double)fabs(scEta);
1801 
1802  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1803 }

References p1, p2, and x.

Referenced by getEtaCorrection().

◆ fEtaEndcapGood()

double ZeeCalibration::fEtaEndcapGood ( double  scEta) const
private

Definition at line 1783 of file ZeeCalibration.cc.

1783  {
1784  // f(eta) for the first 3 classes (100, 110 and 120)
1785  // Ivica's new corrections 01/06
1786  float p0 = 1.06819e+00;
1787  float p1 = -1.53189e-02;
1788  float p2 = 4.01707e-04;
1789 
1790  double x = (double)fabs(scEta);
1791 
1792  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1793 }

References p1, p2, and x.

Referenced by getEtaCorrection().

◆ fillEleInfo()

void ZeeCalibration::fillEleInfo ( std::vector< HepMC::GenParticle * > &  a,
std::map< HepMC::GenParticle *, const reco::GsfElectron * > &  b 
)
private

Definition at line 1860 of file ZeeCalibration.cc.

1861  {
1862  for (unsigned int i = 0; i < mcEle.size(); i++) {
1863  h_eleEffEta_[0]->Fill(fabs(mcEle[i]->momentum().pseudoRapidity()));
1864  h_eleEffPhi_[0]->Fill(mcEle[i]->momentum().phi());
1865  h_eleEffPt_[0]->Fill(mcEle[i]->momentum().perp());
1866 
1867  std::map<HepMC::GenParticle*, const reco::GsfElectron*>::const_iterator mIter = associationMap.find(mcEle[i]);
1868  if (mIter == associationMap.end())
1869  continue;
1870 
1871  if ((*mIter).second) {
1872  const reco::GsfElectron* myEle = (*mIter).second;
1873 
1874  h_eleEffEta_[1]->Fill(fabs(mcEle[i]->momentum().pseudoRapidity()));
1875  h_eleEffPhi_[1]->Fill(mcEle[i]->momentum().phi());
1876  h_eleEffPt_[1]->Fill(mcEle[i]->momentum().perp());
1877  h1_eleEtaResol_->Fill(myEle->eta() - mcEle[i]->momentum().eta());
1878  h1_elePhiResol_->Fill(myEle->phi() - mcEle[i]->momentum().phi());
1879 
1880  const reco::SuperCluster* mySC = &(*(myEle->superCluster()));
1881  if (/*fabs(mySC->position().eta()) < 2.4*/ true) {
1882  // if(myEle->classification()>=100)std::cout<<"mySC->preshowerEnergy()"<<mySC->preshowerEnergy()<<std::endl;
1883 
1884  h_ESCEtrue_[loopFlag_]->Fill(mySC->energy() / mcEle[i]->momentum().e());
1885  h_ESCEtrueVsEta_[loopFlag_]->Fill(fabs(mySC->position().eta()), mySC->energy() / mcEle[i]->momentum().e());
1886 
1887  double corrSCenergy = (mySC->energy()) / getEtaCorrection(myEle);
1888  h_ESCcorrEtrue_[loopFlag_]->Fill(corrSCenergy / mcEle[i]->momentum().e());
1889  h_ESCcorrEtrueVsEta_[loopFlag_]->Fill(fabs(mySC->position().eta()), corrSCenergy / mcEle[i]->momentum().e());
1890 
1891  // std::vector<DetId> mySCRecHits = mySC->seed()->getHitsByDetId();
1892 
1893  h1_seedOverSC_->Fill(mySC->seed()->energy() / mySC->energy());
1894  h1_preshowerOverSC_->Fill(mySC->preshowerEnergy() / mySC->energy());
1895  }
1896  }
1897  }
1898 }

References MillePedeFileConverter_cfg::e, reco::CaloCluster::energy(), reco::LeafCandidate::eta(), getEtaCorrection(), h1_eleEtaResol_, h1_elePhiResol_, h1_preshowerOverSC_, h1_seedOverSC_, h_eleEffEta_, h_eleEffPhi_, h_eleEffPt_, h_ESCcorrEtrue_, h_ESCcorrEtrueVsEta_, h_ESCEtrue_, h_ESCEtrueVsEta_, mps_fire::i, loopFlag_, perp(), phi, reco::LeafCandidate::phi(), reco::CaloCluster::position(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::seed(), and reco::GsfElectron::superCluster().

Referenced by duringLoop().

◆ fillMCInfo()

void ZeeCalibration::fillMCInfo ( HepMC::GenParticle *  mcele)
private

◆ fillMCmap()

void ZeeCalibration::fillMCmap ( const std::vector< const reco::GsfElectron * > *  electronCollection,
const std::vector< HepMC::GenParticle * > &  mcEle,
std::map< HepMC::GenParticle *, const reco::GsfElectron * > &  myMCmap 
)
private

Definition at line 1817 of file ZeeCalibration.cc.

1819  {
1820  for (unsigned int i = 0; i < mcEle.size(); i++) {
1821  float minDR = 0.1;
1822  const reco::GsfElectron* myMatchEle = nullptr;
1823  for (unsigned int j = 0; j < electronCollection->size(); j++) {
1824  float dr = EvalDR(mcEle[i]->momentum().pseudoRapidity(),
1825  (*(*electronCollection)[j]).eta(),
1826  mcEle[i]->momentum().phi(),
1827  (*(*electronCollection)[j]).phi());
1828  if (dr < minDR) {
1829  myMatchEle = (*electronCollection)[j];
1830  minDR = dr;
1831  }
1832  }
1833  myMCmap.insert(std::pair<HepMC::GenParticle*, const reco::GsfElectron*>(mcEle[i], myMatchEle));
1834  }
1835 }

References flavorHistoryFilter_cfi::dr, pdwgLeptonRecoSkim_cfi::electronCollection, PVValHelper::eta, EvalDR(), mps_fire::i, dqmiolumiharvest::j, HLT_FULL_cff::minDR, and phi.

Referenced by duringLoop().

◆ getEtaCorrection()

double ZeeCalibration::getEtaCorrection ( const reco::GsfElectron ele)
private

Definition at line 1928 of file ZeeCalibration.cc.

1928  {
1929  double correction(1.);
1930 
1931  int c = ele->classification();
1932  if (c == 0 || c == 10 || c == 20)
1933  correction = fEtaBarrelGood(ele->superCluster()->eta());
1934 
1935  if (c == 100 || c == 110 || c == 120)
1936  correction = fEtaEndcapGood(ele->superCluster()->eta());
1937 
1938  if (c == 30 || c == 31 || c == 32 || c == 33 || c == 34)
1939  correction = fEtaBarrelBad(ele->superCluster()->eta());
1940 
1941  if (c == 130 || c == 131 || c == 132 || c == 133 || c == 134)
1942  correction = fEtaEndcapBad(ele->superCluster()->eta());
1943 
1944  return correction;
1945 }

References c, reco::GsfElectron::classification(), pfMETCorrectionType0_cfi::correction, fEtaBarrelBad(), fEtaBarrelGood(), fEtaEndcapBad(), fEtaEndcapGood(), and reco::GsfElectron::superCluster().

Referenced by duringLoop(), and fillEleInfo().

◆ getHottestDetId()

std::pair< DetId, double > ZeeCalibration::getHottestDetId ( const std::vector< std::pair< DetId, float > > &  mySCRecHits,
const EBRecHitCollection ebhits,
const EERecHitCollection eehits 
)
private

Definition at line 1947 of file ZeeCalibration.cc.

1949  {
1950  double maxEnergy = -9999.;
1951  const EcalRecHit* hottestRecHit = nullptr;
1952 
1953  std::pair<DetId, double> myPair(DetId(0), -9999.);
1954 
1955  for (std::vector<std::pair<DetId, float> >::const_iterator idIt = mySCRecHits.begin(); idIt != mySCRecHits.end();
1956  idIt++) {
1957  if (idIt->first.subdetId() == EcalBarrel) {
1958  hottestRecHit = &(*(ebhits->find((*idIt).first)));
1959 
1960  if (hottestRecHit == &(*(ebhits->end()))) {
1961  std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@ NO RECHIT FOUND SHOULD NEVER HAPPEN" << std::endl;
1962  continue;
1963  }
1964  } else if (idIt->first.subdetId() == EcalEndcap) {
1965  hottestRecHit = &(*(eehits->find((*idIt).first)));
1966  if (hottestRecHit == &(*(eehits->end()))) {
1967  std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@ NO RECHIT FOUND SHOULD NEVER HAPPEN" << std::endl;
1968  continue;
1969  }
1970  }
1971 
1972  //std::cout<<"[getHottestDetId] hottestRecHit->energy() "<<hottestRecHit->energy()<<std::endl;
1973 
1974  if (hottestRecHit && hottestRecHit->energy() > maxEnergy) {
1975  maxEnergy = hottestRecHit->energy();
1976 
1977  myPair.first = hottestRecHit->id();
1978  myPair.second = maxEnergy;
1979  }
1980 
1981  } //end loop to find hottest RecHit
1982 
1983  //std::cout<<"[ZeeCalibration::getHottestDetId] going to return..."<<std::endl;
1984 
1985  return myPair;
1986 }

References gather_cfg::cout, EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::end(), EcalRecHit::energy(), edm::SortedCollection< T, SORT >::find(), EcalRecHit::id(), particleFlowClusterECALTimeSelected_cfi::maxEnergy, and trackerHitRTTI::vector.

Referenced by duringLoop().

◆ printStatistics()

void ZeeCalibration::printStatistics ( )
private

Definition at line 2111 of file ZeeCalibration.cc.

2111  {
2112  std::cout << "[ CHECK ON BARREL ELECTRON NUMBER ]"
2113  << " first " << BARREL_ELECTRONS_BEFORE_BORDER_CUT << " second " << TOTAL_ELECTRONS_IN_BARREL << std::endl;
2114 
2115  std::cout << "[ EFFICIENCY OF THE BORDER SELECTION ]"
2117 
2118  std::cout << "[ EFFICIENCY OF THE GOLDEN SELECTION ] BARREL: "
2120  << " ENDCAP: " << (float)GOLDEN_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2121 
2122  std::cout << "[ EFFICIENCY OF THE SILVER SELECTION ] BARREL: "
2124  << " ENDCAP: " << (float)SILVER_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2125 
2126  std::cout << "[ EFFICIENCY OF THE SHOWER SELECTION ] BARREL: "
2128  << " ENDCAP: " << (float)SHOWER_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2129 
2130  std::cout << "[ EFFICIENCY OF THE CRACK SELECTION ] BARREL: "
2132  << " ENDCAP: " << (float)CRACK_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2133 
2134  std::ofstream fout("ZeeStatistics.txt");
2135 
2136  if (!fout) {
2137  std::cout << "Cannot open output file.\n";
2138  }
2139 
2140  fout << "ZeeStatistics" << std::endl;
2141 
2142  fout << "##########################RECO#########################" << std::endl;
2143  fout << "##################Zee with Barrel-Barrel electrons: " << BBZN << std::endl;
2144 
2145  fout << "Golden-Golden fraction: " << (float)BBZN_gg / BBZN << " 3-3 fraction is " << (float)BBZN_tt / BBZN
2146  << " 3-whatever fraction is " << (float)BBZN_t0 / BBZN << std::endl;
2147  fout << "##################Zee with Barrel-Endcap electrons: " << EBZN << std::endl;
2148  fout << "Golden-Golden fraction: " << (float)EBZN_gg / EBZN << " 3-3 fraction is " << (float)EBZN_tt / EBZN
2149  << " 3-whatever fraction is " << (float)EBZN_t0 / EBZN << std::endl;
2150  fout << "##################Zee with Endcap-Endcap electrons: " << EEZN << std::endl;
2151  fout << "Golden-Golden fraction: " << (float)EEZN_gg / EEZN << " 3-3 fraction is " << (float)EEZN_tt / EEZN
2152  << " 3-whatever fraction is " << (float)EEZN_t0 / EEZN << std::endl;
2153 
2154  fout << "\n" << std::endl;
2155 
2156  fout << "##########################GEN#########################" << std::endl;
2157  fout << "##################Zee with Barrel-Barrel electrons: " << (float)MCZBB / NEVT << std::endl;
2158  fout << "##################Zee with Barrel-Endcap electrons: " << (float)MCZEB / NEVT << std::endl;
2159  fout << "##################Zee with Endcap-Endcap electrons: " << (float)MCZEE / NEVT << std::endl;
2160 
2161  fout.close();
2162 }

References BARREL_ELECTRONS_AFTER_BORDER_CUT, BARREL_ELECTRONS_BEFORE_BORDER_CUT, BBZN, BBZN_gg, BBZN_t0, BBZN_tt, gather_cfg::cout, CRACK_ELECTRONS_IN_BARREL, CRACK_ELECTRONS_IN_ENDCAP, EBZN, EBZN_gg, EBZN_t0, EBZN_tt, EEZN, EEZN_gg, EEZN_t0, EEZN_tt, dqmMemoryStats::float, groupFilesInBlocks::fout, GOLDEN_ELECTRONS_IN_BARREL, GOLDEN_ELECTRONS_IN_ENDCAP, MCZBB, MCZEB, MCZEE, NEVT, SHOWER_ELECTRONS_IN_BARREL, SHOWER_ELECTRONS_IN_ENDCAP, SILVER_ELECTRONS_IN_BARREL, SILVER_ELECTRONS_IN_ENDCAP, TOTAL_ELECTRONS_IN_BARREL, and TOTAL_ELECTRONS_IN_ENDCAP.

Referenced by endOfJob().

◆ produce()

virtual void ZeeCalibration::produce ( edm::Event ,
const edm::EventSetup  
)
inlinevirtual

Dummy implementation (job done in duringLoop)

Definition at line 80 of file ZeeCalibration.h.

80 {};

◆ produceEcalIntercalibConstants()

std::shared_ptr< EcalIntercalibConstants > ZeeCalibration::produceEcalIntercalibConstants ( const EcalIntercalibConstantsRcd iRecord)
virtual

Produce Ecal interCalibrations.

Definition at line 163 of file ZeeCalibration.cc.

164  {
165  std::cout << "@SUB=ZeeCalibration::produceEcalIntercalibConstants" << std::endl;
166  return ical;
167 }

References gather_cfg::cout, and ical.

Referenced by ZeeCalibration().

◆ resetHistograms()

void ZeeCalibration::resetHistograms ( )
private

Definition at line 2067 of file ZeeCalibration.cc.

2067  {
2069  h1_eventsAfterEWKSelection_->Reset();
2070 
2073 
2074  for (int i = 0; i < 2; i++) {
2075  h_eleEffEta_[i]->Reset();
2076  h_eleEffPhi_[i]->Reset();
2077  h_eleEffPt_[i]->Reset();
2078  }
2079 
2080  h1_seedOverSC_->Reset();
2081  h1_preshowerOverSC_->Reset();
2082 
2083  h1_eleEtaResol_->Reset();
2084  h1_elePhiResol_->Reset();
2085 
2086  h1_zMassResol_->Reset();
2087 
2088  h1_electronCosTheta_TK_->Reset();
2089  h1_electronCosTheta_SC_->Reset();
2090  h1_electronCosTheta_SC_TK_->Reset();
2091 
2092  h2_fEtaBarrelGood_->Reset();
2093  h2_fEtaBarrelBad_->Reset();
2094  h2_fEtaEndcapGood_->Reset();
2095  h2_fEtaEndcapBad_->Reset();
2096  h1_eleClasses_->Reset();
2097 
2098  h1_ZCandMult_->Reset();
2099  h1_reco_ZMass_->Reset();
2100  h1_reco_ZMassCorr_->Reset();
2101  h1_reco_ZMassCorrBB_->Reset();
2102  h1_reco_ZMassCorrEE_->Reset();
2103  h1_occupancyVsEta_->Reset();
2104  h1_occupancy_->Reset();
2105  h1_occupancyBarrel_->Reset();
2106  h1_occupancyEndcap_->Reset();
2107 
2108  return;
2109 }

References h1_eleClasses_, h1_electronCosTheta_SC_, h1_electronCosTheta_SC_TK_, h1_electronCosTheta_TK_, h1_eleEtaResol_, h1_elePhiResol_, h1_eventsAfterBorderSelection_, h1_eventsAfterEWKSelection_, h1_eventsBeforeBorderSelection_, h1_eventsBeforeEWKSelection_, h1_occupancy_, h1_occupancyBarrel_, h1_occupancyEndcap_, h1_occupancyVsEta_, h1_preshowerOverSC_, h1_reco_ZMass_, h1_reco_ZMassCorr_, h1_reco_ZMassCorrBB_, h1_reco_ZMassCorrEE_, h1_seedOverSC_, h1_ZCandMult_, h1_zMassResol_, h2_fEtaBarrelBad_, h2_fEtaBarrelGood_, h2_fEtaEndcapBad_, h2_fEtaEndcapGood_, h_eleEffEta_, h_eleEffPhi_, h_eleEffPt_, and mps_fire::i.

Referenced by startingNewLoop().

◆ resetVariables()

void ZeeCalibration::resetVariables ( )
private

◆ ringNumberCorrector()

int ZeeCalibration::ringNumberCorrector ( int  k)
private

Definition at line 1900 of file ZeeCalibration.cc.

1900  {
1901  int index = -999;
1902 
1903  if (calibMode_ == "RING") {
1904  if (k >= 0 && k <= 84)
1905  index = k - 85;
1906 
1907  if (k >= 85 && k <= 169)
1908  index = k - 84;
1909 
1910  if (k >= 170 && k <= 208)
1911  index = -k + 84;
1912 
1913  if (k >= 209 && k <= 247)
1914  index = k - 123;
1915 
1916  }
1917 
1918  else if (calibMode_ == "MODULE") {
1919  if (k >= 0 && k <= 71)
1920  index = k - 72;
1921 
1922  if (k >= 72 && k <= 143)
1923  index = k - 71;
1924  }
1925  return index;
1926 }

References calibMode_, and dqmdumpme::k.

Referenced by computeCoefficientDistanceAtIteration(), endOfJob(), and endOfLoop().

◆ startingNewLoop()

void ZeeCalibration::startingNewLoop ( unsigned int  iLoop)
overridevirtual

Called at beginning of loop.

Implements edm::EDLooperBase.

Definition at line 1313 of file ZeeCalibration.cc.

1313  {
1314  std::cout << "[ZeeCalibration] Starting loop number " << iLoop << std::endl;
1315 
1317 
1318  resetVariables();
1319 
1320  resetHistograms();
1321 
1322 #ifdef DEBUG
1323  std::cout << "[ZeeCalibration] exiting from startingNewLoop" << std::endl;
1324 #endif
1325 }

References gather_cfg::cout, resetHistograms(), ZIterativeAlgorithmWithFit::resetIteration(), resetVariables(), and theAlgorithm_.

◆ xtalIsOnModuleBorder()

bool ZeeCalibration::xtalIsOnModuleBorder ( EBDetId  myEBDetId)
private

Definition at line 1988 of file ZeeCalibration.cc.

1988  {
1989  bool myBool(false);
1990 
1991  short ieta = myEBDetId.ieta();
1992  short iphi = myEBDetId.iphi();
1993 
1994  // std::cout<<"[xtalIsOnModuleBorder] ieta: "<<ieta<<" iphi "<<iphi<<std::endl;
1995 
1996  myBool = (abs(ieta) == 1 || abs(ieta) == 25 || abs(ieta) == 26 || abs(ieta) == 45 || abs(ieta) == 46 ||
1997  abs(ieta) == 65 || abs(ieta) == 66 || abs(ieta) == 85);
1998 
1999  for (int i = 0; i < 19; i++) {
2000  if (iphi == (20 * i + 1) || iphi == 20 * i)
2001  myBool = true;
2002  }
2003 
2004  return myBool;
2005 }

References funct::abs(), mps_fire::i, EBDetId::ieta(), LEDCalibrationChannels::ieta, EBDetId::iphi(), and LEDCalibrationChannels::iphi.

Referenced by duringLoop().

Member Data Documentation

◆ aHLTNames

char ZeeCalibration::aHLTNames[6000]
private

Definition at line 361 of file ZeeCalibration.h.

◆ aHLTResults

bool ZeeCalibration::aHLTResults[200]
private

Definition at line 364 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ aNames

TString ZeeCalibration::aNames[200]
private

Definition at line 363 of file ZeeCalibration.h.

◆ aTriggerNames

char ZeeCalibration::aTriggerNames[200][30]
private

Definition at line 357 of file ZeeCalibration.h.

◆ aTriggerResults

bool ZeeCalibration::aTriggerResults[200]
private

Definition at line 358 of file ZeeCalibration.h.

◆ BARREL_ELECTRONS_AFTER_BORDER_CUT

int ZeeCalibration::BARREL_ELECTRONS_AFTER_BORDER_CUT
private

Definition at line 324 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ BARREL_ELECTRONS_BEFORE_BORDER_CUT

int ZeeCalibration::BARREL_ELECTRONS_BEFORE_BORDER_CUT
private

Definition at line 323 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ barrelfile_

std::string ZeeCalibration::barrelfile_
private

Definition at line 174 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ BBZN

Int_t ZeeCalibration::BBZN
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ BBZN_gg

Int_t ZeeCalibration::BBZN_gg
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ BBZN_t0

Int_t ZeeCalibration::BBZN_t0
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ BBZN_tt

Int_t ZeeCalibration::BBZN_tt
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ calibCoeff

float ZeeCalibration::calibCoeff[250]
private

Definition at line 188 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), and endOfLoop().

◆ calibCoeffError

float ZeeCalibration::calibCoeffError[250]
private

Definition at line 190 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), and endOfLoop().

◆ calibMode_

std::string ZeeCalibration::calibMode_
private

◆ coefficientDistanceAtIteration

double ZeeCalibration::coefficientDistanceAtIteration[50]
private

Definition at line 321 of file ZeeCalibration.h.

Referenced by endOfJob(), endOfLoop(), and ZeeCalibration().

◆ CRACK_ELECTRONS_IN_BARREL

int ZeeCalibration::CRACK_ELECTRONS_IN_BARREL
private

Definition at line 338 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ CRACK_ELECTRONS_IN_ENDCAP

int ZeeCalibration::CRACK_ELECTRONS_IN_ENDCAP
private

Definition at line 339 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EBZN

Int_t ZeeCalibration::EBZN
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EBZN_gg

Int_t ZeeCalibration::EBZN_gg
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EBZN_t0

Int_t ZeeCalibration::EBZN_t0
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EBZN_tt

Int_t ZeeCalibration::EBZN_tt
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EEZN

Int_t ZeeCalibration::EEZN
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EEZN_gg

Int_t ZeeCalibration::EEZN_gg
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EEZN_t0

Int_t ZeeCalibration::EEZN_t0
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ EEZN_tt

Int_t ZeeCalibration::EEZN_tt
private

Definition at line 307 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ electronCollection_

std::string ZeeCalibration::electronCollection_
private

Definition at line 162 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ electronProducer_

std::string ZeeCalibration::electronProducer_
private

Definition at line 161 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ electronSelection_

unsigned int ZeeCalibration::electronSelection_
private

Definition at line 316 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ endcapfile_

std::string ZeeCalibration::endcapfile_
private

Definition at line 175 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ erechitCollection_

std::string ZeeCalibration::erechitCollection_
private

Definition at line 151 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ erechitProducer_

std::string ZeeCalibration::erechitProducer_
private

Definition at line 150 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ etaBins_

unsigned int ZeeCalibration::etaBins_
private

Definition at line 166 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etaMax_

double ZeeCalibration::etaMax_
private

Definition at line 171 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etaMin_

double ZeeCalibration::etaMin_
private

Definition at line 169 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etBins_

unsigned int ZeeCalibration::etBins_
private

Definition at line 167 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etMax_

double ZeeCalibration::etMax_
private

Definition at line 172 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etMin_

double ZeeCalibration::etMin_
private

Definition at line 170 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ GOLDEN_ELECTRONS_IN_BARREL

int ZeeCalibration::GOLDEN_ELECTRONS_IN_BARREL
private

Definition at line 329 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ GOLDEN_ELECTRONS_IN_ENDCAP

int ZeeCalibration::GOLDEN_ELECTRONS_IN_ENDCAP
private

Definition at line 330 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ h1_borderElectronClassification_

TH1F* ZeeCalibration::h1_borderElectronClassification_
private

Definition at line 305 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), and endOfJob().

◆ h1_eleClasses_

TH1F* ZeeCalibration::h1_eleClasses_
private

Definition at line 217 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_electronCosTheta_SC_

TH1F* ZeeCalibration::h1_electronCosTheta_SC_
private

Definition at line 302 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_electronCosTheta_SC_TK_

TH1F* ZeeCalibration::h1_electronCosTheta_SC_TK_
private

Definition at line 303 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_electronCosTheta_TK_

TH1F* ZeeCalibration::h1_electronCosTheta_TK_
private

Definition at line 301 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_eleERecoOverEtrue_

TH1F* ZeeCalibration::h1_eleERecoOverEtrue_
private

Definition at line 239 of file ZeeCalibration.h.

◆ h1_eleEtaResol_

TH1F* ZeeCalibration::h1_eleEtaResol_
private

Definition at line 241 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h1_elePhiResol_

TH1F* ZeeCalibration::h1_elePhiResol_
private

Definition at line 242 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h1_eventsAfterBorderSelection_

TH1F* ZeeCalibration::h1_eventsAfterBorderSelection_
private

Definition at line 210 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_eventsAfterEWKSelection_

TH1F* ZeeCalibration::h1_eventsAfterEWKSelection_
private

Definition at line 207 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_eventsBeforeBorderSelection_

TH1F* ZeeCalibration::h1_eventsBeforeBorderSelection_
private

Definition at line 209 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_eventsBeforeEWKSelection_

TH1F* ZeeCalibration::h1_eventsBeforeEWKSelection_
private

Definition at line 206 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_mc_

TH1F* ZeeCalibration::h1_mc_
private

Definition at line 262 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_mcEB_

TH1F* ZeeCalibration::h1_mcEB_
private

Definition at line 271 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_mcEBParz_

TH1F* ZeeCalibration::h1_mcEBParz_[25]
private

Definition at line 272 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h1_mcEE_

TH1F* ZeeCalibration::h1_mcEE_
private

Definition at line 275 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_mcEEParz_

TH1F* ZeeCalibration::h1_mcEEParz_[25]
private

Definition at line 276 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h1_mcParz_

TH1F* ZeeCalibration::h1_mcParz_[25]
private

Definition at line 263 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h1_nEleReco_

TH1F* ZeeCalibration::h1_nEleReco_
private

Definition at line 216 of file ZeeCalibration.h.

Referenced by bookHistograms().

◆ h1_occupancy_

TH1F* ZeeCalibration::h1_occupancy_
private

Definition at line 297 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h1_occupancyBarrel_

TH1F* ZeeCalibration::h1_occupancyBarrel_
private

Definition at line 298 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h1_occupancyEndcap_

TH1F* ZeeCalibration::h1_occupancyEndcap_
private

Definition at line 299 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h1_occupancyVsEta_

TH1F* ZeeCalibration::h1_occupancyVsEta_
private

Definition at line 292 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h1_occupancyVsEtaCrack_

TH1F* ZeeCalibration::h1_occupancyVsEtaCrack_
private

Definition at line 295 of file ZeeCalibration.h.

◆ h1_occupancyVsEtaGold_

TH1F* ZeeCalibration::h1_occupancyVsEtaGold_
private

Definition at line 293 of file ZeeCalibration.h.

◆ h1_occupancyVsEtaShower_

TH1F* ZeeCalibration::h1_occupancyVsEtaShower_
private

Definition at line 296 of file ZeeCalibration.h.

◆ h1_occupancyVsEtaSilver_

TH1F* ZeeCalibration::h1_occupancyVsEtaSilver_
private

Definition at line 294 of file ZeeCalibration.h.

◆ h1_preshowerOverSC_

TH1F* ZeeCalibration::h1_preshowerOverSC_
private

Definition at line 224 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h1_reco_ZMass_

TH1F* ZeeCalibration::h1_reco_ZMass_
private

Definition at line 229 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), endOfLoop(), and resetHistograms().

◆ h1_reco_ZMassBad_

TH1F* ZeeCalibration::h1_reco_ZMassBad_
private

Definition at line 235 of file ZeeCalibration.h.

◆ h1_reco_ZMassCorr_

TH1F* ZeeCalibration::h1_reco_ZMassCorr_
private

Definition at line 231 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_reco_ZMassCorrBB_

TH1F* ZeeCalibration::h1_reco_ZMassCorrBB_
private

Definition at line 232 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_reco_ZMassCorrEE_

TH1F* ZeeCalibration::h1_reco_ZMassCorrEE_
private

Definition at line 233 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_reco_ZMassGood_

TH1F* ZeeCalibration::h1_reco_ZMassGood_
private

Definition at line 234 of file ZeeCalibration.h.

◆ h1_RMin_

TH1F* ZeeCalibration::h1_RMin_
private

Definition at line 237 of file ZeeCalibration.h.

◆ h1_RMinZ_

TH1F* ZeeCalibration::h1_RMinZ_
private

Definition at line 238 of file ZeeCalibration.h.

◆ h1_seedOverSC_

TH1F* ZeeCalibration::h1_seedOverSC_
private

Definition at line 223 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h1_weightSumMeanBarrel_

TH1F* ZeeCalibration::h1_weightSumMeanBarrel_
private

Definition at line 289 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_weightSumMeanEndcap_

TH1F* ZeeCalibration::h1_weightSumMeanEndcap_
private

Definition at line 290 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_ZCandMult_

TH1F* ZeeCalibration::h1_ZCandMult_
private

Definition at line 236 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_zEtaResol_

TH1F* ZeeCalibration::h1_zEtaResol_
private

Definition at line 227 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_zMassResol_

TH1F* ZeeCalibration::h1_zMassResol_
private

Definition at line 226 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), endOfJob(), and resetHistograms().

◆ h1_zPhiResol_

TH1F* ZeeCalibration::h1_zPhiResol_
private

Definition at line 228 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_chi2_

TH2F* ZeeCalibration::h2_chi2_[25]
private

Definition at line 278 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and endOfLoop().

◆ h2_coeffVsEta_

TH2F* ZeeCalibration::h2_coeffVsEta_
private

Definition at line 253 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_coeffVsEtaGrouped_

TH2F* ZeeCalibration::h2_coeffVsEtaGrouped_
private

Definition at line 254 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_coeffVsLoop_

TH2F* ZeeCalibration::h2_coeffVsLoop_
private

Definition at line 258 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_fEtaBarrelBad_

TH2F* ZeeCalibration::h2_fEtaBarrelBad_
private

Definition at line 213 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h2_fEtaBarrelGood_

TH2F* ZeeCalibration::h2_fEtaBarrelGood_
private

Definition at line 212 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h2_fEtaEndcapBad_

TH2F* ZeeCalibration::h2_fEtaEndcapBad_
private

Definition at line 215 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h2_fEtaEndcapGood_

TH2F* ZeeCalibration::h2_fEtaEndcapGood_
private

Definition at line 214 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and resetHistograms().

◆ h2_iterations_

TH2F* ZeeCalibration::h2_iterations_[25]
private

Definition at line 279 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and endOfLoop().

◆ h2_miscalRecal_

TH2F* ZeeCalibration::h2_miscalRecal_
private

Definition at line 260 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_miscalRecalEB_

TH2F* ZeeCalibration::h2_miscalRecalEB_
private

Definition at line 269 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_miscalRecalEE_

TH2F* ZeeCalibration::h2_miscalRecalEE_
private

Definition at line 273 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_residualSigma_

TH2F* ZeeCalibration::h2_residualSigma_
private

Definition at line 268 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and endOfLoop().

◆ h2_xtalMiscalibCoeffBarrel_

TH2F* ZeeCalibration::h2_xtalMiscalibCoeffBarrel_
private

Definition at line 285 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), and endOfJob().

◆ h2_xtalMiscalibCoeffEndcapMinus_

TH2F* ZeeCalibration::h2_xtalMiscalibCoeffEndcapMinus_
private

Definition at line 286 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), and endOfJob().

◆ h2_xtalMiscalibCoeffEndcapPlus_

TH2F* ZeeCalibration::h2_xtalMiscalibCoeffEndcapPlus_
private

Definition at line 287 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), and endOfJob().

◆ h2_xtalRecalibCoeffBarrel_

TH2F* ZeeCalibration::h2_xtalRecalibCoeffBarrel_[25]
private

Definition at line 281 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h2_xtalRecalibCoeffEndcapMinus_

TH2F* ZeeCalibration::h2_xtalRecalibCoeffEndcapMinus_[25]
private

Definition at line 282 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h2_xtalRecalibCoeffEndcapPlus_

TH2F* ZeeCalibration::h2_xtalRecalibCoeffEndcapPlus_[25]
private

Definition at line 283 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h2_zMassDiffVsLoop_

TH2F* ZeeCalibration::h2_zMassDiffVsLoop_
private

Definition at line 256 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and endOfLoop().

◆ h2_zMassVsLoop_

TH2F* ZeeCalibration::h2_zMassVsLoop_
private

Definition at line 255 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and endOfLoop().

◆ h2_zWidthVsLoop_

TH2F* ZeeCalibration::h2_zWidthVsLoop_
private

Definition at line 257 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and endOfLoop().

◆ h_eleEffEta

TH1F* ZeeCalibration::h_eleEffEta[2]
private

Definition at line 219 of file ZeeCalibration.h.

◆ h_eleEffEta_

TH1F* ZeeCalibration::h_eleEffEta_[2]
private

Definition at line 244 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h_eleEffPhi

TH1F* ZeeCalibration::h_eleEffPhi[2]
private

Definition at line 220 of file ZeeCalibration.h.

◆ h_eleEffPhi_

TH1F* ZeeCalibration::h_eleEffPhi_[2]
private

Definition at line 245 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h_eleEffPt

TH1F* ZeeCalibration::h_eleEffPt[2]
private

Definition at line 221 of file ZeeCalibration.h.

◆ h_eleEffPt_

TH1F* ZeeCalibration::h_eleEffPt_[2]
private

Definition at line 246 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), fillEleInfo(), and resetHistograms().

◆ h_ESCcorrEtrue_

TH1F* ZeeCalibration::h_ESCcorrEtrue_[25]
private

Definition at line 250 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and fillEleInfo().

◆ h_ESCcorrEtrueVsEta_

TH2F* ZeeCalibration::h_ESCcorrEtrueVsEta_[25]
private

Definition at line 251 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and fillEleInfo().

◆ h_ESCEtrue_

TH1F* ZeeCalibration::h_ESCEtrue_[25]
private

Definition at line 247 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and fillEleInfo().

◆ h_ESCEtrueVsEta_

TH2F* ZeeCalibration::h_ESCEtrueVsEta_[25]
private

Definition at line 248 of file ZeeCalibration.h.

Referenced by bookHistograms(), endOfJob(), and fillEleInfo().

◆ hlAccept_

std::vector<unsigned int> ZeeCalibration::hlAccept_
private

Definition at line 350 of file ZeeCalibration.h.

◆ hlErrors_

std::vector<unsigned int> ZeeCalibration::hlErrors_
private

Definition at line 351 of file ZeeCalibration.h.

◆ hlNames_

std::vector<std::string> ZeeCalibration::hlNames_
private

Definition at line 353 of file ZeeCalibration.h.

◆ hltCount

Int_t ZeeCalibration::hltCount
private

Definition at line 360 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ hltNamesLen

Int_t ZeeCalibration::hltNamesLen
private

Definition at line 362 of file ZeeCalibration.h.

◆ hlTriggerResults_

edm::InputTag ZeeCalibration::hlTriggerResults_
private

Definition at line 341 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ hlWasRun_

std::vector<unsigned int> ZeeCalibration::hlWasRun_
private

Definition at line 349 of file ZeeCalibration.h.

◆ ical

std::shared_ptr<EcalIntercalibConstants> ZeeCalibration::ical
private

Definition at line 193 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), endOfLoop(), and produceEcalIntercalibConstants().

◆ init_

bool ZeeCalibration::init_
private

Definition at line 354 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ initCalibCoeff

float ZeeCalibration::initCalibCoeff[250]
private

Definition at line 191 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), and endOfLoop().

◆ isfirstcall_

bool ZeeCalibration::isfirstcall_
private

Definition at line 366 of file ZeeCalibration.h.

Referenced by beginOfJob(), and duringLoop().

◆ loopArray

double ZeeCalibration::loopArray[50]
private

Definition at line 318 of file ZeeCalibration.h.

Referenced by endOfJob(), endOfLoop(), and ZeeCalibration().

◆ loopFlag_

int ZeeCalibration::loopFlag_
private

Definition at line 186 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfLoop(), and fillEleInfo().

◆ mass

double ZeeCalibration::mass
private

◆ mass4tree

float ZeeCalibration::mass4tree
private

Definition at line 181 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ massDiff4tree

float ZeeCalibration::massDiff4tree
private

Definition at line 182 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ maxInvMassCut_

double ZeeCalibration::maxInvMassCut_
private

Definition at line 178 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ mcProducer_

std::string ZeeCalibration::mcProducer_
private

Definition at line 158 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ MCZBB

Int_t ZeeCalibration::MCZBB
private

Definition at line 308 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ MCZEB

Int_t ZeeCalibration::MCZEB
private

Definition at line 308 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ MCZEE

Int_t ZeeCalibration::MCZEE
private

Definition at line 308 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ minInvMassCut_

double ZeeCalibration::minInvMassCut_
private

Definition at line 177 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ myTree

TTree* ZeeCalibration::myTree
private

Definition at line 144 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), and ZeeCalibration().

◆ myZeePlots_

ZeePlots* ZeeCalibration::myZeePlots_
private

Definition at line 197 of file ZeeCalibration.h.

Referenced by bookHistograms(), duringLoop(), and endOfJob().

◆ myZeeRescaleFactorPlots_

ZeeRescaleFactorPlots* ZeeCalibration::myZeeRescaleFactorPlots_
private

Definition at line 198 of file ZeeCalibration.h.

◆ nAccept_

unsigned int ZeeCalibration::nAccept_
private

Definition at line 346 of file ZeeCalibration.h.

◆ nErrors_

unsigned int ZeeCalibration::nErrors_
private

Definition at line 347 of file ZeeCalibration.h.

◆ nEvents_

unsigned int ZeeCalibration::nEvents_
private

Definition at line 343 of file ZeeCalibration.h.

◆ NEVT

Int_t ZeeCalibration::NEVT
private

Definition at line 308 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ NewCalibCoeff

float ZeeCalibration::NewCalibCoeff[250]
private

Definition at line 189 of file ZeeCalibration.h.

Referenced by endOfLoop().

◆ nWasRun_

unsigned int ZeeCalibration::nWasRun_
private

Definition at line 345 of file ZeeCalibration.h.

◆ outputFile_

TFile* ZeeCalibration::outputFile_
private

Definition at line 310 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), endOfLoop(), and ZeeCalibration().

◆ outputFileName_

std::string ZeeCalibration::outputFileName_
private

Definition at line 146 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ read_events

int ZeeCalibration::read_events
private

Definition at line 184 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ RecalibBarrelHits_

std::string ZeeCalibration::RecalibBarrelHits_
private

Definition at line 164 of file ZeeCalibration.h.

◆ rechitCollection_

std::string ZeeCalibration::rechitCollection_
private

Definition at line 149 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ rechitProducer_

std::string ZeeCalibration::rechitProducer_
private

Definition at line 148 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ scCollection_

std::string ZeeCalibration::scCollection_
private

Definition at line 153 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ scIslandCollection_

std::string ZeeCalibration::scIslandCollection_
private

Definition at line 156 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ scIslandProducer_

std::string ZeeCalibration::scIslandProducer_
private

Definition at line 155 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ scProducer_

std::string ZeeCalibration::scProducer_
private

Definition at line 152 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ SHOWER_ELECTRONS_IN_BARREL

int ZeeCalibration::SHOWER_ELECTRONS_IN_BARREL
private

Definition at line 335 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ SHOWER_ELECTRONS_IN_ENDCAP

int ZeeCalibration::SHOWER_ELECTRONS_IN_ENDCAP
private

Definition at line 336 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ sigmaArray

double ZeeCalibration::sigmaArray[50]
private

Definition at line 319 of file ZeeCalibration.h.

Referenced by endOfJob(), endOfLoop(), and ZeeCalibration().

◆ sigmaErrorArray

double ZeeCalibration::sigmaErrorArray[50]
private

Definition at line 320 of file ZeeCalibration.h.

Referenced by endOfJob(), endOfLoop(), and ZeeCalibration().

◆ SILVER_ELECTRONS_IN_BARREL

int ZeeCalibration::SILVER_ELECTRONS_IN_BARREL
private

Definition at line 332 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ SILVER_ELECTRONS_IN_ENDCAP

int ZeeCalibration::SILVER_ELECTRONS_IN_ENDCAP
private

Definition at line 333 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ theAlgorithm_

ZIterativeAlgorithmWithFit* ZeeCalibration::theAlgorithm_
private

Definition at line 195 of file ZeeCalibration.h.

Referenced by duringLoop(), endOfJob(), endOfLoop(), startingNewLoop(), and ZeeCalibration().

◆ theMaxLoops

unsigned int ZeeCalibration::theMaxLoops
private

Definition at line 312 of file ZeeCalibration.h.

Referenced by endOfJob(), endOfLoop(), and ZeeCalibration().

◆ theParameterSet

edm::ParameterSet ZeeCalibration::theParameterSet
private

Definition at line 202 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ TOTAL_ELECTRONS_IN_BARREL

int ZeeCalibration::TOTAL_ELECTRONS_IN_BARREL
private

Definition at line 326 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ TOTAL_ELECTRONS_IN_ENDCAP

int ZeeCalibration::TOTAL_ELECTRONS_IN_ENDCAP
private

Definition at line 327 of file ZeeCalibration.h.

Referenced by duringLoop(), printStatistics(), and resetVariables().

◆ triggerCount

Int_t ZeeCalibration::triggerCount
private

Definition at line 356 of file ZeeCalibration.h.

◆ wantEtaCorrection_

bool ZeeCalibration::wantEtaCorrection_
private

Definition at line 314 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

EcalCondObjectContainer::getMap
const self & getMap() const
Definition: EcalCondObjectContainer.h:78
ZeeCalibration::h1_eleEtaResol_
TH1F * h1_eleEtaResol_
Definition: ZeeCalibration.h:241
ZeeCalibration::h1_reco_ZMassCorr_
TH1F * h1_reco_ZMassCorr_
Definition: ZeeCalibration.h:231
ZeeCalibration::computeCoefficientDistanceAtIteration
float computeCoefficientDistanceAtIteration(float v1[250], float v2[250], int size)
Definition: ZeeCalibration.cc:2007
ZeeCalibration::h2_miscalRecalEB_
TH2F * h2_miscalRecalEB_
Definition: ZeeCalibration.h:269
ZeeCalibration::SILVER_ELECTRONS_IN_BARREL
int SILVER_ELECTRONS_IN_BARREL
Definition: ZeeCalibration.h:332
ZeeCalibration::h1_occupancyBarrel_
TH1F * h1_occupancyBarrel_
Definition: ZeeCalibration.h:298
ZeeCalibration::aHLTResults
bool aHLTResults[200]
Definition: ZeeCalibration.h:364
ZeeCalibration::h2_chi2_
TH2F * h2_chi2_[25]
Definition: ZeeCalibration.h:278
ZeeCalibration::TOTAL_ELECTRONS_IN_BARREL
int TOTAL_ELECTRONS_IN_BARREL
Definition: ZeeCalibration.h:326
ZeeCalibration::rechitProducer_
std::string rechitProducer_
Definition: ZeeCalibration.h:148
EcalRecHit
Definition: EcalRecHit.h:15
ZIterativeAlgorithmWithFit::addEvent
bool addEvent(calib::CalibElectron *, calib::CalibElectron *, float)
Definition: ZIterativeAlgorithmWithFit.cc:250
ZeeCalibration::MCZBB
Int_t MCZBB
Definition: ZeeCalibration.h:308
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
mps_fire.i
i
Definition: mps_fire.py:428
ZeeCalibration::h_ESCEtrue_
TH1F * h_ESCEtrue_[25]
Definition: ZeeCalibration.h:247
ZeeCalibration::myTree
TTree * myTree
Definition: ZeeCalibration.h:144
calibXMLwriter
Definition: calibXMLwriter.h:15
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
calib::CalibElectron
Definition: CalibElectron.h:13
ZeeCalibration::fEtaEndcapGood
double fEtaEndcapGood(double scEta) const
Definition: ZeeCalibration.cc:1783
HLT_FULL_cff.minDR
minDR
Definition: HLT_FULL_cff.py:20394
ZeeCalibration::h2_fEtaEndcapBad_
TH2F * h2_fEtaEndcapBad_
Definition: ZeeCalibration.h:215
ZeeCalibration::h1_eventsAfterBorderSelection_
TH1F * h1_eventsAfterBorderSelection_
Definition: ZeeCalibration.h:210
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ZeeCalibration::sigmaErrorArray
double sigmaErrorArray[50]
Definition: ZeeCalibration.h:320
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ZeeCalibration::NewCalibCoeff
float NewCalibCoeff[250]
Definition: ZeeCalibration.h:189
CaloMiscalibMapEcal::get
const EcalIntercalibConstants & get()
Definition: CaloMiscalibMapEcal.h:90
ZeeCalibration::BBZN_t0
Int_t BBZN_t0
Definition: ZeeCalibration.h:307
EcalRecHit::id
DetId id() const
get the id
Definition: EcalRecHit.h:77
ZeeCalibration::EBZN_t0
Int_t EBZN_t0
Definition: ZeeCalibration.h:307
ZeeCalibration::massDiff4tree
float massDiff4tree
Definition: ZeeCalibration.h:182
reco::SuperCluster
Definition: SuperCluster.h:18
ZeeCalibration::erechitProducer_
std::string erechitProducer_
Definition: ZeeCalibration.h:150
ZeeCalibration::h1_mcEBParz_
TH1F * h1_mcEBParz_[25]
Definition: ZeeCalibration.h:272
ZeeCalibration::h2_fEtaBarrelBad_
TH2F * h2_fEtaBarrelBad_
Definition: ZeeCalibration.h:213
ZeePlots::fillEleInfo
void fillEleInfo(const reco::GsfElectronCollection *)
Definition: ZeePlots.cc:220
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EcalIndexingTools
Definition: EcalIndexingTools.h:9
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
ZeeCalibration::outputFileName_
std::string outputFileName_
Definition: ZeeCalibration.h:146
ZeeCalibration::h2_xtalRecalibCoeffBarrel_
TH2F * h2_xtalRecalibCoeffBarrel_[25]
Definition: ZeeCalibration.h:281
MZ
#define MZ
Definition: ZeeCalibration.cc:63
phits
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ phits
Definition: BrokenLineFitOnGPU.h:27
ZeeCalibration::etMin_
double etMin_
Definition: ZeeCalibration.h:170
ZeeCalibration::h2_zMassVsLoop_
TH2F * h2_zMassVsLoop_
Definition: ZeeCalibration.h:255
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ZeeCalibration::hlTriggerResults_
edm::InputTag hlTriggerResults_
Definition: ZeeCalibration.h:341
ZeePlots::fillZMCInfo
void fillZMCInfo(const HepMC::GenEvent *)
Definition: ZeePlots.cc:132
ZIterativeAlgorithmWithFit::getOptimizedChiSquare
const std::vector< float > & getOptimizedChiSquare() const
Definition: ZIterativeAlgorithmWithFit.h:65
ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots
Definition: ZIterativeAlgorithmWithFit.h:30
mitigatedMETSequence_cff.DPhi
DPhi
Definition: mitigatedMETSequence_cff.py:37
edm::SortedCollection< EcalRecHit >
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
ZeeCalibration::scIslandCollection_
std::string scIslandCollection_
Definition: ZeeCalibration.h:156
EEDetId::IX_MIN
static const int IX_MIN
Definition: EEDetId.h:290
ZIterativeAlgorithmWithFit::getNumberOfIterations
int getNumberOfIterations() const
Definition: ZIterativeAlgorithmWithFit.h:57
pdwgLeptonRecoSkim_cfi.electronCollection
electronCollection
Definition: pdwgLeptonRecoSkim_cfi.py:5
ZeeCalibration::h2_fEtaEndcapGood_
TH2F * h2_fEtaEndcapGood_
Definition: ZeeCalibration.h:214
ZeeCalibration::resetVariables
void resetVariables()
Definition: ZeeCalibration.cc:2033
ZeeCalibration::h1_reco_ZMass_
TH1F * h1_reco_ZMass_
Definition: ZeeCalibration.h:229
ZeeCalibration::mass4tree
float mass4tree
Definition: ZeeCalibration.h:181
EcalIndexingTools::setBinRange
void setBinRange(int, double, double, int, double, double)
Definition: EcalIndexingTools.cc:8
reco::GsfElectronCollection
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
Definition: GsfElectronFwd.h:14
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ZeeCalibration::h2_zMassDiffVsLoop_
TH2F * h2_zMassDiffVsLoop_
Definition: ZeeCalibration.h:256
DDAxes::x
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
EcalRecHit::energy
float energy() const
Definition: EcalRecHit.h:68
ZeeCalibration::h1_occupancyVsEta_
TH1F * h1_occupancyVsEta_
Definition: ZeeCalibration.h:292
ZeeCalibration::h1_ZCandMult_
TH1F * h1_ZCandMult_
Definition: ZeeCalibration.h:236
EEDetId::IY_MIN
static const int IY_MIN
Definition: EEDetId.h:294
CaloMiscalibMapEcal::prefillMap
void prefillMap()
Definition: CaloMiscalibMapEcal.h:20
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
SiStripPI::rms
Definition: SiStripPayloadInspectorHelper.h:169
ZeeCalibration::h1_zMassResol_
TH1F * h1_zMassResol_
Definition: ZeeCalibration.h:226
edm::Handle< edm::TriggerResults >
ZeeCalibration::h1_zEtaResol_
TH1F * h1_zEtaResol_
Definition: ZeeCalibration.h:227
ZeeCalibration::coefficientDistanceAtIteration
double coefficientDistanceAtIteration[50]
Definition: ZeeCalibration.h:321
ZeePlots::writeMCEleHistograms
void writeMCEleHistograms()
Definition: ZeePlots.cc:255
ZeeCalibration::erechitCollection_
std::string erechitCollection_
Definition: ZeeCalibration.h:151
ZeeCalibration::CRACK_ELECTRONS_IN_ENDCAP
int CRACK_ELECTRONS_IN_ENDCAP
Definition: ZeeCalibration.h:339
ZeeKinematicTools::cosThetaElectrons_TK
static float cosThetaElectrons_TK(const std::pair< calib::CalibElectron *, calib::CalibElectron * > &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
Definition: ZeeKinematicTools.cc:63
EcalBarrel
Definition: EcalSubdetector.h:10
ZeeKinematicTools::calculateZMass_withTK
static float calculateZMass_withTK(const std::pair< calib::CalibElectron *, calib::CalibElectron * > &aZCandidate)
Definition: ZeeKinematicTools.cc:129
ZeeCalibration::TOTAL_ELECTRONS_IN_ENDCAP
int TOTAL_ELECTRONS_IN_ENDCAP
Definition: ZeeCalibration.h:327
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
ZeeCalibration::h2_residualSigma_
TH2F * h2_residualSigma_
Definition: ZeeCalibration.h:268
ZeeCalibration::h1_electronCosTheta_TK_
TH1F * h1_electronCosTheta_TK_
Definition: ZeeCalibration.h:301
ZeeCalibration::EBZN_gg
Int_t EBZN_gg
Definition: ZeeCalibration.h:307
ZeeKinematicTools::calculateZMassWithCorrectedElectrons_withTK
static float calculateZMassWithCorrectedElectrons_withTK(const std::pair< calib::CalibElectron *, calib::CalibElectron * > &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
Definition: ZeeKinematicTools.cc:102
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
ZeeCalibration::electronCollection_
std::string electronCollection_
Definition: ZeeCalibration.h:162
ZeeCalibration::mass
double mass
Definition: ZeeCalibration.h:179
ZeeCalibration::isfirstcall_
bool isfirstcall_
Definition: ZeeCalibration.h:366
reco::SuperClusterCollection
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
Definition: SuperClusterFwd.h:9
ZeeCalibration::theMaxLoops
unsigned int theMaxLoops
Definition: ZeeCalibration.h:312
DetId
Definition: DetId.h:17
ZeeCalibration::ringNumberCorrector
int ringNumberCorrector(int k)
Definition: ZeeCalibration.cc:1900
ZeeCalibration::h1_elePhiResol_
TH1F * h1_elePhiResol_
Definition: ZeeCalibration.h:242
ZeeCalibration::EEZN_gg
Int_t EEZN_gg
Definition: ZeeCalibration.h:307
ZeeCalibration::sigmaArray
double sigmaArray[50]
Definition: ZeeCalibration.h:319
ZeePlots::fillEleMCInfo
void fillEleMCInfo(const HepMC::GenEvent *)
Definition: ZeePlots.cc:178
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
ZeeCalibration::BARREL_ELECTRONS_BEFORE_BORDER_CUT
int BARREL_ELECTRONS_BEFORE_BORDER_CUT
Definition: ZeeCalibration.h:323
ZeeCalibration::h1_seedOverSC_
TH1F * h1_seedOverSC_
Definition: ZeeCalibration.h:223
ZeeCalibration::h_eleEffPhi_
TH1F * h_eleEffPhi_[2]
Definition: ZeeCalibration.h:245
ZeeCalibration::h2_miscalRecalEE_
TH2F * h2_miscalRecalEE_
Definition: ZeeCalibration.h:273
edm::EDLooperBase::kStop
Definition: EDLooperBase.h:82
edm::HLTGlobalStatus::size
unsigned int size() const
Get number of paths stored.
Definition: HLTGlobalStatus.h:35
calibXMLwriter::writeLine
void writeLine(EBDetId const &, float)
Definition: calibXMLwriter.cc:32
ZeeCalibration::theParameterSet
edm::ParameterSet theParameterSet
Definition: ZeeCalibration.h:202
PVValHelper::eta
Definition: PVValidationHelpers.h:70
ZeeCalibration::BBZN_tt
Int_t BBZN_tt
Definition: ZeeCalibration.h:307
ZeeCalibration::rechitCollection_
std::string rechitCollection_
Definition: ZeeCalibration.h:149
ZeePlots::fillHLTInfo
void fillHLTInfo(edm::Handle< edm::TriggerResults >)
Definition: ZeePlots.cc:299
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ZeeCalibration::h2_miscalRecal_
TH2F * h2_miscalRecal_
Definition: ZeeCalibration.h:260
edm::ESHandle< CaloGeometry >
ZeeCalibration::bookHistograms
void bookHistograms()
Definition: ZeeCalibration.cc:1496
p2
double p2[4]
Definition: TauolaWrapper.h:90
ZeeCalibration::ical
std::shared_ptr< EcalIntercalibConstants > ical
Definition: ZeeCalibration.h:193
ZeeCalibration::fillMCmap
void fillMCmap(const std::vector< const reco::GsfElectron * > *electronCollection, const std::vector< HepMC::GenParticle * > &mcEle, std::map< HepMC::GenParticle *, const reco::GsfElectron * > &myMCmap)
Definition: ZeeCalibration.cc:1817
ZeeKinematicTools::cosThetaElectrons_SC
static float cosThetaElectrons_SC(const std::pair< calib::CalibElectron *, calib::CalibElectron * > &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
Definition: ZeeKinematicTools.cc:39
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
ZeeCalibration::scProducer_
std::string scProducer_
Definition: ZeeCalibration.h:152
EBDetId::MAX_IPHI
static const int MAX_IPHI
Definition: EBDetId.h:137
EEDetId::IY_MAX
static const int IY_MAX
Definition: EEDetId.h:302
reco::GsfElectron
Definition: GsfElectron.h:35
VtxSmearedParameters_cfi.Phi
Phi
Definition: VtxSmearedParameters_cfi.py:112
dqmdumpme.k
k
Definition: dqmdumpme.py:60
ZeeCalibration::CRACK_ELECTRONS_IN_BARREL
int CRACK_ELECTRONS_IN_BARREL
Definition: ZeeCalibration.h:338
ZeeCalibration::maxInvMassCut_
double maxInvMassCut_
Definition: ZeeCalibration.h:178
EcalRingCalibrationTools::getDetIdsInRing
static std::vector< DetId > getDetIdsInRing(short aRingIndex)
Retrieve the DetIds in a phi-ring.
Definition: EcalRingCalibrationTools.cc:66
ZeeCalibration::EBZN
Int_t EBZN
Definition: ZeeCalibration.h:307
ZeeCalibration::h2_iterations_
TH2F * h2_iterations_[25]
Definition: ZeeCalibration.h:279
ZeeCalibration::h2_coeffVsEtaGrouped_
TH2F * h2_coeffVsEtaGrouped_
Definition: ZeeCalibration.h:254
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
ZeeCalibration::h_ESCcorrEtrue_
TH1F * h_ESCcorrEtrue_[25]
Definition: ZeeCalibration.h:250
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
EEDetId
Definition: EEDetId.h:14
ZeeCalibration::h1_reco_ZMassCorrEE_
TH1F * h1_reco_ZMassCorrEE_
Definition: ZeeCalibration.h:233
EcalEndcap
Definition: EcalSubdetector.h:10
ZeeCalibration::etaMax_
double etaMax_
Definition: ZeeCalibration.h:171
MiscalibReaderFromXMLEcalBarrel
Definition: MiscalibReaderFromXMLEcalBarrel.h:8
ZeeCalibration::resetHistograms
void resetHistograms()
Definition: ZeeCalibration.cc:2067
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
ZeePlots::writeZHistograms
void writeZHistograms()
Definition: ZeePlots.cc:110
ZeePlots::bookEleHistograms
void bookEleHistograms()
Definition: ZeePlots.cc:195
ZeeCalibration::MCZEB
Int_t MCZEB
Definition: ZeeCalibration.h:308
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
EcalIndexingTools::getInstance
static EcalIndexingTools * getInstance()
Definition: EcalIndexingTools.h:23
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
ZeeCalibration::h1_mcEB_
TH1F * h1_mcEB_
Definition: ZeeCalibration.h:271
ZeeCalibration::loopArray
double loopArray[50]
Definition: ZeeCalibration.h:318
ZeePlots::writeMCZHistograms
void writeMCZHistograms()
Definition: ZeePlots.cc:122
CaloMiscalibMapEcal
Definition: CaloMiscalibMapEcal.h:16
ZeeCalibration::scIslandProducer_
std::string scIslandProducer_
Definition: ZeeCalibration.h:155
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ZeeCalibration::SHOWER_ELECTRONS_IN_BARREL
int SHOWER_ELECTRONS_IN_BARREL
Definition: ZeeCalibration.h:335
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
ZeeCalibration::init_
bool init_
Definition: ZeeCalibration.h:354
ZeeCalibration::h1_weightSumMeanEndcap_
TH1F * h1_weightSumMeanEndcap_
Definition: ZeeCalibration.h:290
ZeeCalibration::outputFile_
TFile * outputFile_
Definition: ZeeCalibration.h:310
ZeePlots::fillZInfo
void fillZInfo(std::pair< calib::CalibElectron *, calib::CalibElectron * > myZeeCandidate)
Definition: ZeePlots.cc:100
ZeeCalibration::produceEcalIntercalibConstants
virtual std::shared_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &iRecord)
Produce Ecal interCalibrations.
Definition: ZeeCalibration.cc:163
pfMETCorrectionType0_cfi.correction
correction
Definition: pfMETCorrectionType0_cfi.py:39
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
ZeeCalibration::h1_mcEE_
TH1F * h1_mcEE_
Definition: ZeeCalibration.h:275
ZeePlots::bookZHistograms
void bookZHistograms()
Definition: ZeePlots.cc:74
ZeeCalibration::h1_preshowerOverSC_
TH1F * h1_preshowerOverSC_
Definition: ZeeCalibration.h:224
ZeeCalibration::hltCount
Int_t hltCount
Definition: ZeeCalibration.h:360
ZeeCalibration::h1_reco_ZMassCorrBB_
TH1F * h1_reco_ZMassCorrBB_
Definition: ZeeCalibration.h:232
ZIterativeAlgorithmWithFit
Definition: ZIterativeAlgorithmWithFit.h:28
EEDetId::IX_MAX
static const int IX_MAX
Definition: EEDetId.h:298
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
ZeeCalibration::h1_mc_
TH1F * h1_mc_
Definition: ZeeCalibration.h:262
ZeeCalibration::minInvMassCut_
double minInvMassCut_
Definition: ZeeCalibration.h:177
ZeeCalibration::calibMode_
std::string calibMode_
Definition: ZeeCalibration.h:159
ZeeCalibration::etBins_
unsigned int etBins_
Definition: ZeeCalibration.h:167
iEvent
int iEvent
Definition: GenABIO.cc:224
ZeePlots::writeEleHistograms
void writeEleHistograms()
Definition: ZeePlots.cc:240
ZeeCalibration::h1_occupancy_
TH1F * h1_occupancy_
Definition: ZeeCalibration.h:297
ZeeCalibration::BBZN_gg
Int_t BBZN_gg
Definition: ZeeCalibration.h:307
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
ZeeCalibration::wantEtaCorrection_
bool wantEtaCorrection_
Definition: ZeeCalibration.h:314
p1
double p1[4]
Definition: TauolaWrapper.h:89
MiscalibReaderFromXMLEcalEndcap
Definition: MiscalibReaderFromXMLEcalEndcap.h:8
cuy.ib
ib
Definition: cuy.py:661
ZeeCalibration::getHottestDetId
std::pair< DetId, double > getHottestDetId(const std::vector< std::pair< DetId, float > > &mySCRecHits, const EBRecHitCollection *ebhits, const EERecHitCollection *eehits)
Definition: ZeeCalibration.cc:1947
ZeeCalibration::h2_zWidthVsLoop_
TH2F * h2_zWidthVsLoop_
Definition: ZeeCalibration.h:257
edm::EDLooperBase::kContinue
Definition: EDLooperBase.h:82
particleFlowClusterECALTimeSelected_cfi.maxEnergy
maxEnergy
Definition: particleFlowClusterECALTimeSelected_cfi.py:10
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
ZeeCalibration::h2_xtalRecalibCoeffEndcapPlus_
TH2F * h2_xtalRecalibCoeffEndcapPlus_[25]
Definition: ZeeCalibration.h:283
ZeeCalibration::h1_electronCosTheta_SC_
TH1F * h1_electronCosTheta_SC_
Definition: ZeeCalibration.h:302
ZeePlots
Definition: ZeePlots.h:50
get
#define get
ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots::weightedRescaleFactor
TH1 * weightedRescaleFactor[50][250]
Definition: ZIterativeAlgorithmWithFit.h:31
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ZeeCalibration::h2_xtalMiscalibCoeffEndcapMinus_
TH2F * h2_xtalMiscalibCoeffEndcapMinus_
Definition: ZeeCalibration.h:286
ZeeCalibration::fEtaBarrelGood
double fEtaBarrelGood(double scEta) const
Definition: ZeeCalibration.cc:1805
ZeeCalibration::h2_xtalMiscalibCoeffBarrel_
TH2F * h2_xtalMiscalibCoeffBarrel_
Definition: ZeeCalibration.h:285
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:33
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
ZIterativeAlgorithmWithFit::gausfit
static void gausfit(TH1F *histoou, double *par, double *errpar, float nsigmalow, float nsigmaup, double *mychi2, int *iterations)
Definition: ZIterativeAlgorithmWithFit.cc:355
ZIterativeAlgorithmWithFit::getOptimizedCoefficients
const std::vector< float > & getOptimizedCoefficients() const
Definition: ZIterativeAlgorithmWithFit.h:61
ZeeCalibration::BBZN
Int_t BBZN
Definition: ZeeCalibration.h:307
ZeeCalibration::EEZN
Int_t EEZN
Definition: ZeeCalibration.h:307
EBDetId::validDetId
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
DDAxes::phi
ZeeCalibration::initCalibCoeff
float initCalibCoeff[250]
Definition: ZeeCalibration.h:191
ZeeCalibration::h2_coeffVsEta_
TH2F * h2_coeffVsEta_
Definition: ZeeCalibration.h:253
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
ZeeCalibration::read_events
int read_events
Definition: ZeeCalibration.h:184
ZeeCalibration::h2_xtalRecalibCoeffEndcapMinus_
TH2F * h2_xtalRecalibCoeffEndcapMinus_[25]
Definition: ZeeCalibration.h:282
edm::SortedCollection::find
iterator find(key_type k)
Definition: SortedCollection.h:240
ZIterativeAlgorithmWithFit::iterate
bool iterate()
Definition: ZIterativeAlgorithmWithFit.cc:182
EcalRingCalibrationTools::getDetIdsInModule
static std::vector< DetId > getDetIdsInModule(short int)
Definition: EcalRingCalibrationTools.cc:125
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
ZeeCalibration::calibCoeff
float calibCoeff[250]
Definition: ZeeCalibration.h:188
ZeeCalibration::theAlgorithm_
ZIterativeAlgorithmWithFit * theAlgorithm_
Definition: ZeeCalibration.h:195
ZeePlots::bookEleMCHistograms
void bookEleMCHistograms()
Definition: ZeePlots.cc:156
ZeeCalibration::h2_fEtaBarrelGood_
TH2F * h2_fEtaBarrelGood_
Definition: ZeeCalibration.h:212
ZeeCalibration::h1_eleClasses_
TH1F * h1_eleClasses_
Definition: ZeeCalibration.h:217
ZeeCalibration::calibCoeffError
float calibCoeffError[250]
Definition: ZeeCalibration.h:190
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
reco::SuperCluster::preshowerEnergy
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:61
ZeeCalibration::SILVER_ELECTRONS_IN_ENDCAP
int SILVER_ELECTRONS_IN_ENDCAP
Definition: ZeeCalibration.h:333
ZIterativeAlgorithmWithFit::getHistos
const ZIterativeAlgorithmWithFitPlots * getHistos() const
Definition: ZIterativeAlgorithmWithFit.h:55
ZeeCalibration::mcProducer_
std::string mcProducer_
Definition: ZeeCalibration.h:158
ZeeCalibration::electronSelection_
unsigned int electronSelection_
Definition: ZeeCalibration.h:316
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
ZeeCalibration::etMax_
double etMax_
Definition: ZeeCalibration.h:172
ZeeCalibration::h1_eventsBeforeEWKSelection_
TH1F * h1_eventsBeforeEWKSelection_
Definition: ZeeCalibration.h:206
ZeeCalibration::etaMin_
double etaMin_
Definition: ZeeCalibration.h:169
ZeeCalibration::h_eleEffPt_
TH1F * h_eleEffPt_[2]
Definition: ZeeCalibration.h:246
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
ZeeCalibration::getEtaCorrection
double getEtaCorrection(const reco::GsfElectron *)
Definition: ZeeCalibration.cc:1928
ZeeCalibration::NEVT
Int_t NEVT
Definition: ZeeCalibration.h:308
ZeePlots::bookHLTHistograms
void bookHLTHistograms()
Definition: ZeePlots.cc:270
ZeePlots::bookZMCHistograms
void bookZMCHistograms()
Definition: ZeePlots.cc:50
ZeeCalibration::h1_zPhiResol_
TH1F * h1_zPhiResol_
Definition: ZeeCalibration.h:228
ZeeCalibration::h2_xtalMiscalibCoeffEndcapPlus_
TH2F * h2_xtalMiscalibCoeffEndcapPlus_
Definition: ZeeCalibration.h:287
reco::GsfElectron::classification
Classification classification() const
Definition: GsfElectron.h:792
ZeeCalibration::h1_electronCosTheta_SC_TK_
TH1F * h1_electronCosTheta_SC_TK_
Definition: ZeeCalibration.h:303
ZIterativeAlgorithmWithFit::resetIteration
bool resetIteration()
Definition: ZIterativeAlgorithmWithFit.cc:168
ZeeCalibration::h1_mcEEParz_
TH1F * h1_mcEEParz_[25]
Definition: ZeeCalibration.h:276
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
ZeeCalibration::fEtaBarrelBad
double fEtaBarrelBad(double scEta) const
Definition: ZeeCalibration.cc:1773
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
reco::GsfElectron::superCluster
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:163
ZeeCalibration::printStatistics
void printStatistics()
Definition: ZeeCalibration.cc:2111
ZeeCalibration::h1_eventsBeforeBorderSelection_
TH1F * h1_eventsBeforeBorderSelection_
Definition: ZeeCalibration.h:209
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
ZeeCalibration::h2_coeffVsLoop_
TH2F * h2_coeffVsLoop_
Definition: ZeeCalibration.h:258
ZeeCalibration::electronProducer_
std::string electronProducer_
Definition: ZeeCalibration.h:161
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
ZeeCalibration::h1_nEleReco_
TH1F * h1_nEleReco_
Definition: ZeeCalibration.h:216
ZeeCalibration::h1_mcParz_
TH1F * h1_mcParz_[25]
Definition: ZeeCalibration.h:263
ZeeCalibration::etaBins_
unsigned int etaBins_
Definition: ZeeCalibration.h:166
ZeeCalibration::EEZN_tt
Int_t EEZN_tt
Definition: ZeeCalibration.h:307
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
ZeeCalibration::MCZEE
Int_t MCZEE
Definition: ZeeCalibration.h:308
ZeeCalibration::xtalIsOnModuleBorder
bool xtalIsOnModuleBorder(EBDetId myEBDetId)
Definition: ZeeCalibration.cc:1988
ZIterativeAlgorithmWithFit::getOptimizedIterations
const std::vector< int > & getOptimizedIterations() const
Definition: ZIterativeAlgorithmWithFit.h:67
ZeeCalibration::h_ESCEtrueVsEta_
TH2F * h_ESCEtrueVsEta_[25]
Definition: ZeeCalibration.h:248
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ZeeCalibration::GOLDEN_ELECTRONS_IN_ENDCAP
int GOLDEN_ELECTRONS_IN_ENDCAP
Definition: ZeeCalibration.h:330
ZeeCalibration::h_eleEffEta_
TH1F * h_eleEffEta_[2]
Definition: ZeeCalibration.h:244
ZeeCalibration::barrelfile_
std::string barrelfile_
Definition: ZeeCalibration.h:174
ZeeCalibration::fEtaEndcapBad
double fEtaEndcapBad(double scEta) const
Definition: ZeeCalibration.cc:1795
ZeeCalibration::GOLDEN_ELECTRONS_IN_BARREL
int GOLDEN_ELECTRONS_IN_BARREL
Definition: ZeeCalibration.h:329
ZeeCalibration::scCollection_
std::string scCollection_
Definition: ZeeCalibration.h:153
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ZeeCalibration::endcapfile_
std::string endcapfile_
Definition: ZeeCalibration.h:175
ZeeCalibration::h1_eventsAfterEWKSelection_
TH1F * h1_eventsAfterEWKSelection_
Definition: ZeeCalibration.h:207
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
EcalRingCalibrationTools::setCaloGeometry
static void setCaloGeometry(const CaloGeometry *geometry)
Definition: EcalRingCalibrationTools.cc:181
ZeeCalibration::fillEleInfo
void fillEleInfo(std::vector< HepMC::GenParticle * > &a, std::map< HepMC::GenParticle *, const reco::GsfElectron * > &b)
Definition: ZeeCalibration.cc:1860
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
edm::InputTag
Definition: InputTag.h:15
EcalRingCalibrationTools::getDetIdsInECAL
static std::vector< DetId > getDetIdsInECAL()
Definition: EcalRingCalibrationTools.cc:102
ZeeCalibration::h1_weightSumMeanBarrel_
TH1F * h1_weightSumMeanBarrel_
Definition: ZeeCalibration.h:289
ZeeCalibration::h1_borderElectronClassification_
TH1F * h1_borderElectronClassification_
Definition: ZeeCalibration.h:305
ZeeCalibration::h_ESCcorrEtrueVsEta_
TH2F * h_ESCcorrEtrueVsEta_[25]
Definition: ZeeCalibration.h:251
ZeeCalibration::EvalDR
float EvalDR(float Eta, float Eta_ref, float Phi, float Phi_ref)
Definition: ZeeCalibration.cc:1837
ZeeCalibration::EBZN_tt
Int_t EBZN_tt
Definition: ZeeCalibration.h:307
EBDetId::MAX_IETA
static const int MAX_IETA
Definition: EBDetId.h:136
ZeeCalibration::myZeePlots_
ZeePlots * myZeePlots_
Definition: ZeeCalibration.h:197
ZeeCalibration::h1_occupancyEndcap_
TH1F * h1_occupancyEndcap_
Definition: ZeeCalibration.h:299
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
ZIterativeAlgorithmWithFit::getNumberOfChannels
int getNumberOfChannels() const
Definition: ZIterativeAlgorithmWithFit.h:59
ZeeCalibration::SHOWER_ELECTRONS_IN_ENDCAP
int SHOWER_ELECTRONS_IN_ENDCAP
Definition: ZeeCalibration.h:336
edm::SortedCollection::empty
bool empty() const
Definition: SortedCollection.h:210
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
ZeeCalibration::BARREL_ELECTRONS_AFTER_BORDER_CUT
int BARREL_ELECTRONS_AFTER_BORDER_CUT
Definition: ZeeCalibration.h:324
cleanAndMergeSuperClusters_cfi.scCollection
scCollection
Definition: cleanAndMergeSuperClusters_cfi.py:12
EBDetId::MIN_IPHI
static const int MIN_IPHI
Definition: EBDetId.h:135
ZeeCalibration::loopFlag_
int loopFlag_
Definition: ZeeCalibration.h:186
ZIterativeAlgorithmWithFit::getOptimizedCoefficientsError
const std::vector< float > & getOptimizedCoefficientsError() const
Definition: ZIterativeAlgorithmWithFit.h:63
ZeeCalibration::EEZN_t0
Int_t EEZN_t0
Definition: ZeeCalibration.h:307