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...
 
void beginOfJob (EventSetupImpl const &)
 
virtual void beginOfJob (EventSetup 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
 
const edm::EDGetTokenT< EBRecHitCollectionebRecHitToken_
 
Int_t EBZN
 
Int_t EBZN_gg
 
Int_t EBZN_t0
 
Int_t EBZN_tt
 
const edm::EDGetTokenT< EERecHitCollectioneeRecHitToken_
 
Int_t EEZN
 
Int_t EEZN_gg
 
Int_t EEZN_t0
 
Int_t EEZN_tt
 
const std::string electronCollection_
 
const std::string electronProducer_
 
unsigned int electronSelection_
 
std::string endcapfile_
 
const std::string erechitCollection_
 
const std::string erechitProducer_
 
unsigned int etaBins_
 
double etaMax_
 
double etaMin_
 
unsigned int etBins_
 
double etMax_
 
double etMin_
 
const edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeometryToken_
 
int GOLDEN_ELECTRONS_IN_BARREL
 
int GOLDEN_ELECTRONS_IN_ENDCAP
 
const edm::EDGetTokenT< reco::GsfElectronCollectiongsfElectronToken_
 
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]
 
const edm::EDGetTokenT< edm::HepMCProducthepMCToken_
 
std::vector< unsigned int > hlAccept_
 
std::vector< unsigned int > hlErrors_
 
std::vector< std::string > hlNames_
 
Int_t hltCount
 
Int_t hltNamesLen
 
const edm::InputTag hlTriggerResults_
 
std::vector< unsigned int > hlWasRun_
 
std::shared_ptr< EcalIntercalibConstantsical
 
bool init_
 
float initCalibCoeff [250]
 
bool isfirstcall_
 
const edm::EDGetTokenT< reco::SuperClusterCollectionislandSCToken_
 
double loopArray [50]
 
int loopFlag_
 
double mass
 
float mass4tree
 
float massDiff4tree
 
double maxInvMassCut_
 
const 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
 
const std::string rechitCollection_
 
const std::string rechitProducer_
 
const std::string scCollection_
 
const std::string scIslandCollection_
 
const std::string scIslandProducer_
 
const std::string scProducer_
 
const edm::EDGetTokenT< reco::SuperClusterCollectionscToken_
 
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
 
const edm::EDGetTokenT< edm::TriggerResultstrigResultsToken_
 
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 es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *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 >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

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

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

Definition at line 68 of file ZeeCalibration.h.

Constructor & Destructor Documentation

◆ ZeeCalibration()

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

Constructor.

Definition at line 40 of file ZeeCalibration.cc.

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

41  : hlTriggerResults_(iConfig.getParameter<edm::InputTag>("HLTriggerResults")),
42  mcProducer_(iConfig.getUntrackedParameter<std::string>("mcProducer", "")),
43  rechitProducer_(iConfig.getParameter<std::string>("rechitProducer")),
44  rechitCollection_(iConfig.getParameter<std::string>("rechitCollection")),
45  erechitProducer_(iConfig.getParameter<std::string>("erechitProducer")),
46  erechitCollection_(iConfig.getParameter<std::string>("erechitCollection")),
47  scProducer_(iConfig.getParameter<std::string>("scProducer")),
48  scCollection_(iConfig.getParameter<std::string>("scCollection")),
49  scIslandProducer_(iConfig.getParameter<std::string>("scIslandProducer")),
50  scIslandCollection_(iConfig.getParameter<std::string>("scIslandCollection")),
51  electronProducer_(iConfig.getParameter<std::string>("electronProducer")),
52  electronCollection_(iConfig.getParameter<std::string>("electronCollection")),
53  trigResultsToken_(consumes<edm::TriggerResults>(hlTriggerResults_)),
54  hepMCToken_(consumes<edm::HepMCProduct>(edm::InputTag(mcProducer_))),
55  ebRecHitToken_(consumes<EBRecHitCollection>(edm::InputTag(rechitProducer_, rechitCollection_))),
56  eeRecHitToken_(consumes<EERecHitCollection>(edm::InputTag(erechitProducer_, erechitCollection_))),
57  scToken_(consumes<reco::SuperClusterCollection>(edm::InputTag(scProducer_, scCollection_))),
58  islandSCToken_(consumes<reco::SuperClusterCollection>(edm::InputTag(scIslandProducer_, scIslandCollection_))),
59  gsfElectronToken_(consumes<reco::GsfElectronCollection>(edm::InputTag(electronProducer_, electronCollection_))),
61 #ifdef DEBUG
62  std::cout << "[ZeeCalibration] Starting the ctor" << std::endl;
63 #endif
64 
65  theMaxLoops = iConfig.getUntrackedParameter<unsigned int>("maxLoops", 0);
66 
67  wantEtaCorrection_ = iConfig.getUntrackedParameter<bool>("wantEtaCorrection", true);
68 
69  outputFileName_ = iConfig.getParameter<std::string>("outputFile");
70 
71  minInvMassCut_ = iConfig.getUntrackedParameter<double>("minInvMassCut", 70.);
72  maxInvMassCut_ = iConfig.getUntrackedParameter<double>("maxInvMassCut", 110.);
73 
74  calibMode_ = iConfig.getUntrackedParameter<std::string>("ZCalib_CalibType");
75 
76  outputFile_ = TFile::Open(outputFileName_.c_str(), "RECREATE"); // open output file to store histograms
77 
78  myTree = new TTree("myTree", "myTree");
79  // myTree->Branch("zMass","zMass", &mass);
80  myTree->Branch("zMass", &mass4tree, "mass/F");
81  myTree->Branch("zMassDiff", &massDiff4tree, "massDiff/F");
82 
83  barrelfile_ = iConfig.getUntrackedParameter<std::string>("initialMiscalibrationBarrel", "");
84  endcapfile_ = iConfig.getUntrackedParameter<std::string>("initialMiscalibrationEndcap", "");
85 
87  iConfig.getUntrackedParameter<unsigned int>("electronSelection", 0); //option for electron selection
88 
89  etaBins_ = iConfig.getUntrackedParameter<unsigned int>("etaBins", 10);
90  etBins_ = iConfig.getUntrackedParameter<unsigned int>("etBins", 10);
91 
92  etaMin_ = iConfig.getUntrackedParameter<double>("etaMin", 0.);
93  etMin_ = iConfig.getUntrackedParameter<double>("etMin", 0.);
94  etaMax_ = iConfig.getUntrackedParameter<double>("etaMax", 3.);
95  etMax_ = iConfig.getUntrackedParameter<double>("etMax", 100.);
96 
97  // new ZeePlots("zeePlots.root");
98  // ZeePlots->bookHistos();
99 
100  //ZeeCalibrationPLots("zeeCalibPlots");
101  //ZeecaPlots->bookHistos(maxsIter);
102 
103  theParameterSet = iConfig;
104  EcalIndexingTools* myIndexTool = nullptr;
105 
106  myIndexTool = EcalIndexingTools::getInstance();
107 
109 
110  //creating the algorithm
112 
113  // Tell the framework what data is being produced
114  //setWhatProduced(this);
116  findingRecord<EcalIntercalibConstantsRcd>();
117 
118  for (int i = 0; i < 50; i++) {
120  loopArray[i] = -1.;
121  sigmaArray[i] = -1.;
122  sigmaErrorArray[i] = -1.;
123  }
124 
125 #ifdef DEBUG
126  std::cout << "[ZeeCalibration] Done with the ctor" << std::endl;
127 #endif
128 }
unsigned int etBins_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
const edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
std::string calibMode_
std::string outputFileName_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const std::string electronCollection_
void setBinRange(int, double, double, int, double, double)
const std::string electronProducer_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_
unsigned int theMaxLoops
const std::string erechitProducer_
const edm::InputTag hlTriggerResults_
std::string endcapfile_
const edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
T getUntrackedParameter(std::string const &, T const &) const
const std::string erechitCollection_
const std::string scIslandCollection_
double sigmaArray[50]
static EcalIndexingTools * getInstance()
const std::string scProducer_
ZIterativeAlgorithmWithFit * theAlgorithm_
const edm::EDGetTokenT< reco::SuperClusterCollection > islandSCToken_
unsigned int electronSelection_
const std::string scCollection_
const std::string rechitCollection_
double coefficientDistanceAtIteration[50]
const edm::EDGetTokenT< reco::SuperClusterCollection > scToken_
unsigned int etaBins_
edm::ParameterSet theParameterSet
double loopArray[50]
const std::string scIslandProducer_
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
const std::string mcProducer_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronToken_
virtual std::shared_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &iRecord)
Produce Ecal interCalibrations.
std::string barrelfile_
const std::string rechitProducer_
double sigmaErrorArray[50]

◆ ~ZeeCalibration()

ZeeCalibration::~ZeeCalibration ( )
override

Destructor.

Definition at line 130 of file ZeeCalibration.cc.

130  {
131  // if (theAlgorithm_)
132  // delete theAlgorithm_;
133 }

Member Function Documentation

◆ beginOfJob()

void ZeeCalibration::beginOfJob ( )
overridevirtual

Called at beginning of job.

Reimplemented from edm::EDLooperBase.

Definition at line 143 of file ZeeCalibration.cc.

References isfirstcall_.

143 { isfirstcall_ = true; }

◆ bookHistograms()

void ZeeCalibration::bookHistograms ( )
private

Definition at line 1463 of file ZeeCalibration.cc.

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().

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

◆ computeCoefficientDistanceAtIteration()

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

Definition at line 1974 of file ZeeCalibration.cc.

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

Referenced by endOfLoop().

1974  {
1975  float dist(0.);
1976 
1977  for (int i = 0; i < size; i++) {
1978  // std::cout<< "[ZeeCalibration::computeCoefficientDistanceAtIteration] Adding term "<<pow( v1[i]-v2[i], 2 )<<" from v1 "<<v1[i]<<" and v2 "<<v2[i]<<std::endl;
1979 
1980  bool isNearCrack = false;
1981 
1982  if (calibMode_ == "RING") { //exclude non-calibrated rings from computation
1983 
1984  isNearCrack = (abs(ringNumberCorrector(i)) == 1 || abs(ringNumberCorrector(i)) == 25 ||
1985  abs(ringNumberCorrector(i)) == 26 || abs(ringNumberCorrector(i)) == 45 ||
1986  abs(ringNumberCorrector(i)) == 46 || abs(ringNumberCorrector(i)) == 65 ||
1987  abs(ringNumberCorrector(i)) == 66 || abs(ringNumberCorrector(i)) == 85 ||
1988  abs(ringNumberCorrector(i)) == 86 || abs(ringNumberCorrector(i)) == 124);
1989  }
1990 
1991  if (!isNearCrack)
1992  dist += pow(v1[i] - v2[i], 2);
1993  }
1994 
1995  dist = sqrt(dist) / size;
1996 
1997  return dist;
1998 }
size
Write out results.
std::string calibMode_
int ringNumberCorrector(int k)
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ 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 552 of file ZeeCalibration.cc.

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_, DMR_cfg::cerr, ALCARECOTkAlJpsiMuMu_cff::charge, ZeeKinematicTools::cosThetaElectrons_SC(), ZeeKinematicTools::cosThetaElectrons_TK(), gather_cfg::cout, CRACK_ELECTRONS_IN_BARREL, CRACK_ELECTRONS_IN_ENDCAP, ebRecHitToken_, EBZN, EBZN_gg, EBZN_t0, EBZN_tt, EcalBarrel, EcalEndcap, eeRecHitToken_, EEZN, EEZN_gg, EEZN_t0, EEZN_tt, pdwgLeptonRecoSkim_cfi::electronCollection, electronSelection_, edm::SortedCollection< T, SORT >::empty(), endcapfile_, PVValHelper::eta, JetChargeProducer_cfi::exp, ZeePlots::fillEleInfo(), fillEleInfo(), ZeePlots::fillEleMCInfo(), ZeePlots::fillHLTInfo(), fillMCmap(), ZeePlots::fillZInfo(), ZeePlots::fillZMCInfo(), EcalCondObjectContainer< T >::find(), dqmdumpme::first, dqmMemoryStats::float, GenParticle::GenParticle, geometryToken_, CaloMiscalibMapEcal::get(), edm::EventSetup::getData(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInModule(), EcalRingCalibrationTools::getDetIdsInRing(), getEtaCorrection(), edm::HepMCProduct::GetEvent(), getHottestDetId(), EcalCondObjectContainer< T >::getMap(), ZIterativeAlgorithmWithFit::getNumberOfChannels(), GOLDEN_ELECTRONS_IN_BARREL, GOLDEN_ELECTRONS_IN_ENDCAP, gsfElectronToken_, 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_, hepMCToken_, hfClusterShapes_cfi::hits, hltCount, mps_fire::i, ical, EBDetId::ieta(), iEvent, init_, initCalibCoeff, EBDetId::iphi(), isfirstcall_, islandSCToken_, 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, cleanAndMergeSuperClusters_cfi::scCollection, scToken_, 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, trigResultsToken_, wantEtaCorrection_, xtalIsOnModuleBorder(), and EEDetId::zside().

552  {
553  using namespace edm;
554 
555 #ifdef DEBUG
556  std::cout << "[ZeeCalibration] Entering duringLoop" << std::endl;
557 #endif
558 
559  // code that used to be in beginJob
560  if (isfirstcall_) {
561  //inizializzare la geometria di ecal
562  const auto& geometry = iSetup.getData(geometryToken_);
564 
565  myZeePlots_ = new ZeePlots("zeePlots.root");
566  // myZeeRescaleFactorPlots_ = new ZeeRescaleFactorPlots("zeeRescaleFactorPlots.root");
567 
568  // go to *OUR* rootfile and book histograms
569  outputFile_->cd();
570  bookHistograms();
571 
572  std::cout << "[ZeeCalibration::beginOfJob] Histograms booked " << std::endl;
573 
574  loopFlag_ = 0;
575 
576  //Read miscalibration map if requested
577  CaloMiscalibMapEcal* miscalibMap = nullptr;
578  if (!barrelfile_.empty() || !barrelfile_.empty()) {
579  miscalibMap = new CaloMiscalibMapEcal();
580  miscalibMap->prefillMap();
581  }
582 
583  if (!barrelfile_.empty()) {
584  MiscalibReaderFromXMLEcalBarrel barrelreader_(*miscalibMap);
585  barrelreader_.parseXMLMiscalibFile(barrelfile_);
586 #ifdef DEBUG
587  std::cout << "[ZeeCalibration::beginOfJob] Parsed EB miscal file" << std::endl;
588 #endif
589  }
590 
591  if (!endcapfile_.empty()) {
592  MiscalibReaderFromXMLEcalEndcap endcapreader_(*miscalibMap);
593  endcapreader_.parseXMLMiscalibFile(endcapfile_);
594 #ifdef DEBUG
595  std::cout << "[ZeeCalibration::beginOfJob] Parsed EE miscal file" << std::endl;
596 #endif
597  }
598 
599  std::cout << " theAlgorithm_->getNumberOfChannels() " << theAlgorithm_->getNumberOfChannels() << std::endl;
600 
602  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
603  calibCoeff[k] = 1.;
604  calibCoeffError[k] = 0.;
605 
606  std::vector<DetId> ringIds;
607 
608  if (calibMode_ == "RING")
610 
611  if (calibMode_ == "MODULE")
613 
614  if (calibMode_ == "ABS_SCALE" || calibMode_ == "ETA_ET_MODE")
616 
617  if (miscalibMap) {
618  initCalibCoeff[k] = 0.;
619  for (unsigned int iid = 0; iid < ringIds.size(); ++iid) {
620  float miscalib = *(miscalibMap->get().getMap().find(ringIds[iid]));
621  // float miscalib=miscalibMap->get().getMap().find(ringIds[iid])->second; ////////AP
622  initCalibCoeff[k] += miscalib;
623  }
624  initCalibCoeff[k] /= (float)ringIds.size();
625  std::cout << k << " " << initCalibCoeff[k] << " " << ringIds.size() << std::endl;
626  } else {
627  initCalibCoeff[k] = 1.;
628  }
629  }
630 
631  ical = std::make_shared<EcalIntercalibConstants>();
632 
633  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
634  // std::vector<DetId> ringIds = EcalRingCalibrationTools::getDetIdsInRing(k);
635 
636  std::vector<DetId> ringIds;
637 
638  if (calibMode_ == "RING")
640 
641  if (calibMode_ == "MODULE")
643 
644  if (calibMode_ == "ABS_SCALE" || calibMode_ == "ETA_ET_MODE")
646 
647  for (unsigned int iid = 0; iid < ringIds.size(); ++iid) {
648  // ical->setValue( ringIds[iid], 1. * initCalibCoeff[k] );
649 
650  if (ringIds[iid].subdetId() == EcalBarrel) {
651  EBDetId myEBDetId(ringIds[iid]);
652  h2_xtalMiscalibCoeffBarrel_->SetBinContent(
653  myEBDetId.ieta() + 86,
654  myEBDetId.iphi(),
655  *(miscalibMap->get().getMap().find(ringIds[iid]))); //fill TH2 with miscalibCoeff
656  }
657 
658  if (ringIds[iid].subdetId() == EcalEndcap) {
659  EEDetId myEEDetId(ringIds[iid]);
660  if (myEEDetId.zside() < 0)
661  h2_xtalMiscalibCoeffEndcapMinus_->SetBinContent(
662  myEEDetId.ix(),
663  myEEDetId.iy(),
664  *(miscalibMap->get().getMap().find(ringIds[iid]))); //fill TH2 with miscalibCoeff
665 
666  if (myEEDetId.zside() > 0)
667  h2_xtalMiscalibCoeffEndcapPlus_->SetBinContent(
668  myEEDetId.ix(),
669  myEEDetId.iy(),
670  *(miscalibMap->get().getMap().find(ringIds[iid]))); //fill TH2 with miscalibCoeff
671  }
672 
673  ical->setValue(ringIds[iid], *(miscalibMap->get().getMap().find(ringIds[iid])));
674  }
675 
676  read_events = 0;
677  init_ = false;
678  }
679  isfirstcall_ = false;
680  } // if isfirstcall
681 
683 
684  for (unsigned int iHLT = 0; iHLT < 200; ++iHLT) {
685  aHLTResults[iHLT] = false;
686  }
687 
688 #ifdef DEBUG
689  std::cout << "[ZeeCalibration::duringLoop] Done with initializing aHLTresults[] " << std::endl;
690 #endif
691 
692  edm::Handle<edm::TriggerResults> hltTriggerResultHandle;
693  iEvent.getByToken(trigResultsToken_, hltTriggerResultHandle);
694 
695  if (!hltTriggerResultHandle.isValid()) {
696  //std::cout << "invalid handle for HLT TriggerResults" << std::endl;
697  } else {
698  hltCount = hltTriggerResultHandle->size();
699 
700  if (loopFlag_ == 0)
701  myZeePlots_->fillHLTInfo(hltTriggerResultHandle);
702 
703 #ifdef DEBUG
704  std::cout << "[ZeeCalibration::duringLoop] Done with myZeePlots_->fillHLTInfo(hltTriggerResultHandle); "
705  << std::endl;
706 #endif
707 
708  for (int i = 0; i < hltCount; i++) {
709  aHLTResults[i] = hltTriggerResultHandle->accept(i);
710 
711  //HLT bit 32 = HLT1Electron
712  //HLT bit 34 = HLT2Electron
713  //HLT bit 35 = HLT2ElectronRelaxed
714  }
715 
716  if (!aHLTResults[32] && !aHLTResults[34] && !aHLTResults[35])
717  return kContinue;
718  }
719 
720 #ifdef DEBUG
721  std::cout << "[ZeeCalibration::duringLoop] End HLT section" << std::endl;
722 #endif
723 
725 
726  std::vector<HepMC::GenParticle*> mcEle;
727 
728  float myGenZMass(-1);
729 
730  if (!mcProducer_.empty()) {
731  //DUMP GENERATED Z MASS - BEGIN
732  Handle<HepMCProduct> hepProd;
733  iEvent.getByToken(hepMCToken_, hepProd);
734 
735  const HepMC::GenEvent* myGenEvent = hepProd->GetEvent();
736 
737  if (loopFlag_ == 0)
738  myZeePlots_->fillZMCInfo(&(*myGenEvent));
739 
740 #ifdef DEBUG
741  std::cout << "[ZeeCalibration::duringLoop] Done with myZeePlots_->fillZMCInfo( & (*myGenEvent) ); " << std::endl;
742 #endif
743 
744  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
745  ++p) {
746  //return a pointer to MC Z in the event
747  if ((*p)->pdg_id() == 23 && (*p)->status() == 2) {
748  myGenZMass = (*p)->momentum().m();
749  }
750  }
751  //DUMP GENERATED Z MASS - END
752 
753  if (loopFlag_ == 0)
754  myZeePlots_->fillEleMCInfo(&(*myGenEvent));
755 
756  //loop over MC positrons and find the closest MC positron in (eta,phi) phace space - begin
757  HepMC::GenParticle MCele;
758 
759  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
760  ++p) {
761  if (abs((*p)->pdg_id()) == 11) {
762  mcEle.push_back((*p));
763  MCele = *(*p);
764  }
765  }
766 
767  if (mcEle.size() == 2 && fabs(mcEle[0]->momentum().eta()) < 2.4 && fabs(mcEle[1]->momentum().eta()) < 2.4) {
768  NEVT++;
769 
770  if (fabs(mcEle[0]->momentum().eta()) < 1.479 && fabs(mcEle[1]->momentum().eta()) < 1.479)
771  MCZBB++;
772 
773  if ((fabs(mcEle[0]->momentum().eta()) > 1.479 && fabs(mcEle[1]->momentum().eta()) < 1.479) ||
774  (fabs(mcEle[0]->momentum().eta()) < 1.479 && fabs(mcEle[1]->momentum().eta()) > 1.479))
775  MCZEB++;
776 
777  if (fabs(mcEle[0]->momentum().eta()) > 1.479 && fabs(mcEle[1]->momentum().eta()) > 1.479)
778  MCZEE++;
779  }
780  }
781 
782  // Get EBRecHits
784  iEvent.getByToken(ebRecHitToken_, phits);
785  if (!phits.isValid()) {
786  std::cerr << "Error! can't get the product EBRecHitCollection " << std::endl;
787  }
788  const EBRecHitCollection* hits = phits.product(); // get a ptr to the product
789 
790  // Get EERecHits
792  iEvent.getByToken(eeRecHitToken_, ephits);
793  if (!ephits.isValid()) {
794  std::cerr << "Error! can't get the product EERecHitCollection " << std::endl;
795  }
796  const EERecHitCollection* ehits = ephits.product(); // get a ptr to the product
797 
798  //Get Hybrid SuperClusters
800  iEvent.getByToken(scToken_, pSuperClusters);
801  if (!pSuperClusters.isValid()) {
802  std::cerr << "Error! can't get the product SuperClusterCollection " << std::endl;
803  }
804  const reco::SuperClusterCollection* scCollection = pSuperClusters.product();
805 
806 #ifdef DEBUG
807  std::cout << "scCollection->size()" << scCollection->size() << std::endl;
808  for (reco::SuperClusterCollection::const_iterator scIt = scCollection->begin(); scIt != scCollection->end(); scIt++) {
809  std::cout << scIt->energy() << std::endl;
810  }
811 #endif
812 
813  //Get Island SuperClusters
814  Handle<reco::SuperClusterCollection> pIslandSuperClusters;
815  iEvent.getByToken(islandSCToken_, pIslandSuperClusters);
816  if (!pIslandSuperClusters.isValid()) {
817  std::cerr << "Error! can't get the product IslandSuperClusterCollection " << std::endl;
818  }
819  const reco::SuperClusterCollection* scIslandCollection = pIslandSuperClusters.product();
820 
821 #ifdef DEBUG
822  std::cout << "scCollection->size()" << scIslandCollection->size() << std::endl;
823 #endif
824 
825  if ((scCollection->size() + scIslandCollection->size()) < 2)
826  return kContinue;
827 
828  // Get Electrons
830  iEvent.getByToken(gsfElectronToken_, pElectrons);
831  if (!pElectrons.isValid()) {
832  std::cerr << "Error! can't get the product ElectronCollection " << std::endl;
833  }
835 
836  /*
837  //reco-mc association map
838  std::map<HepMC::GenParticle*,const reco::PixelMatchGsfElectron*> myMCmap;
839 
840  fillMCmap(&(*electronCollection),mcEle,myMCmap);
841 
842  fillEleInfo(mcEle,myMCmap);
843  */
844 
845  if (electronCollection->size() < 2)
846  return kContinue;
847 
848  if (!hits && !ehits) {
849  std::cout << "!hits" << std::endl;
850  return kContinue;
851  }
852 
853  if (hits->empty() && ehits->empty()) {
854  std::cout << "hits->size() == 0" << std::endl;
855  return kContinue;
856  }
857 
858  if (!electronCollection) {
859  std::cout << "!electronCollection" << std::endl;
860  return kContinue;
861  }
862 
863  if (electronCollection->empty()) {
864  std::cout << "electronCollection->size() == 0" << std::endl;
865  return kContinue;
866  }
867 
871 
872  read_events++;
873 
874  // std::cout << "read_events = " << read_events << std::endl;
875 
877 
878 #ifdef DEBUG
879  std::cout << " Starting with myZeePlots_->fillEleInfo(electronCollection); " << std::endl;
880 #endif
881 
882  if (loopFlag_ == 0)
884 
885 #ifdef DEBUG
886  std::cout << " Done with myZeePlots_->fillEleInfo(electronCollection); " << std::endl;
887 #endif
888 
889  //FILL an electron vector - end
890  //###################################Electron-SC association: begin#####################################################
891  //Filling new ElectronCollection with new SC ref and calibElectron container
892  std::vector<calib::CalibElectron> calibElectrons;
893  //std::map< const calib::CalibElectron* , const reco::SuperCluster* > eleScMap;
894 
895  //#####################################Electron-SC association map: end#####################################################
896  for (unsigned int e_it = 0; e_it != electronCollection->size(); e_it++) {
897  calibElectrons.push_back(calib::CalibElectron(&((*electronCollection)[e_it]), hits, ehits));
898 #ifdef DEBUG
899  std::cout << calibElectrons.back().getRecoElectron()->superCluster()->energy() << " "
900  << calibElectrons.back().getRecoElectron()->energy() << std::endl;
901 #endif
902  // h1_recoEleEnergy_->Fill(calibElectrons.back().getRecoElectron()->superCluster()->energy());
903  }
904  // if (iLoop == 0)
905  //fillCalibElectrons(calibElectrons);
906 
907 #ifdef DEBUG
908  std::cout << "Filled histos" << std::endl;
909 #endif
910 
911  //COMBINATORY FOR Z MASS - begin
912  std::vector<std::pair<calib::CalibElectron*, calib::CalibElectron*> > zeeCandidates;
913  int myBestZ = -1;
914 
915  mass = -1.;
916  double DeltaMinvMin(5000.);
917 
918  if (calibElectrons.size() < 2)
919  return kContinue;
920 
921  for (unsigned int e_it = 0; e_it != calibElectrons.size() - 1; e_it++) {
922  for (unsigned int p_it = e_it + 1; p_it != calibElectrons.size(); p_it++) {
923 #ifdef DEBUG
924  std::cout << e_it << " " << calibElectrons[e_it].getRecoElectron()->charge() << " " << p_it << " "
925  << calibElectrons[p_it].getRecoElectron()->charge() << std::endl;
926 #endif
927  if (calibElectrons[e_it].getRecoElectron()->charge() * calibElectrons[p_it].getRecoElectron()->charge() != -1)
928  continue;
929 
931  std::pair<calib::CalibElectron*, calib::CalibElectron*>(&(calibElectrons[e_it]), &(calibElectrons[p_it])));
932 
933  if (mass < 0)
934  continue;
935 
936 #ifdef DEBUG
937  std::cout << "#######################mass " << mass << std::endl;
938 #endif
939 
940  zeeCandidates.push_back(
941  std::pair<calib::CalibElectron*, calib::CalibElectron*>(&(calibElectrons[e_it]), &(calibElectrons[p_it])));
942  double DeltaMinv = fabs(mass - MZ);
943 
944  if (DeltaMinv < DeltaMinvMin) {
945  DeltaMinvMin = DeltaMinv;
946  myBestZ = zeeCandidates.size() - 1;
947  }
948  }
949  }
950 
951  // h_DeltaZMassDistr_[loopFlag_]->Fill( (mass-MZ) / MZ );
952 
953  // zeeCa->Fill(zeeCandidates);
954  //
955  h1_ZCandMult_->Fill(zeeCandidates.size());
956 
957  if (zeeCandidates.empty() || myBestZ == -1)
958  return kContinue;
959 
960  if (loopFlag_ == 0)
961  myZeePlots_->fillZInfo(zeeCandidates[myBestZ]);
962 
963 #ifdef DEBUG
964  std::cout << "Found ZCandidates " << myBestZ << std::endl;
965 #endif
966 
967  // h1_zMassResol_ ->Fill(mass-myGenZMass);
968 
970 
971  int class1 = zeeCandidates[myBestZ].first->getRecoElectron()->classification();
972  int class2 = zeeCandidates[myBestZ].second->getRecoElectron()->classification();
973 
974  h1_eleClasses_->Fill(class1);
975  h1_eleClasses_->Fill(class2);
976 
977  std::cout << "BEFORE " << std::endl;
978 
979  // myZeePlots_->fillEleClassesPlots( zeeCandidates[myBestZ].first );
980  //myZeePlots_->fillEleClassesPlots( zeeCandidates[myBestZ].second );
981 
982  std::cout << "AFTER " << std::endl;
983 
985 
986  if (class1 < 100)
987  // h1_Elec_->Fill(1);
989  if (class1 >= 100)
991 
992  if (class2 < 100)
994  if (class2 >= 100)
996 
997  if (class1 == 0)
999  if (class1 == 100)
1001  if (class1 == 10 || class1 == 20)
1003  if (class1 == 110 || class1 == 120)
1005  if (class1 >= 30 && class1 <= 34)
1007  if (class1 >= 130 && class1 <= 134)
1009  if (class1 == 40)
1011  if (class1 == 140)
1013 
1014  if (class2 == 0)
1016  if (class2 == 100)
1018  if (class2 == 10 || class2 == 20)
1020  if (class2 == 110 || class2 == 120)
1022  if (class2 >= 30 && class2 <= 34)
1024  if (class2 >= 130 && class2 <= 134)
1026  if (class2 == 40)
1028  if (class2 == 140)
1030 
1032 
1034 
1035  DetId firstElehottestDetId =
1037  zeeCandidates[myBestZ].first->getRecoElectron()->superCluster()->seed()->hitsAndFractions(), hits, ehits)
1038  .first;
1039  DetId secondElehottestDetId =
1041  zeeCandidates[myBestZ].second->getRecoElectron()->superCluster()->seed()->hitsAndFractions(), hits, ehits)
1042  .first;
1043 
1044  bool firstElectronIsOnModuleBorder(false);
1045  bool secondElectronIsOnModuleBorder(false);
1046 
1048 
1049  if (class1 < 100) {
1050  if (firstElehottestDetId.subdetId() == EcalBarrel)
1051  firstElectronIsOnModuleBorder = xtalIsOnModuleBorder(firstElehottestDetId);
1052 
1054 
1055  if (firstElehottestDetId.subdetId() == EcalBarrel && !firstElectronIsOnModuleBorder)
1057  }
1058 
1059  if (class2 < 100) {
1060  if (secondElehottestDetId.subdetId() == EcalBarrel)
1061  secondElectronIsOnModuleBorder = xtalIsOnModuleBorder(secondElehottestDetId);
1062 
1064 
1065  if (secondElehottestDetId.subdetId() == EcalBarrel && !secondElectronIsOnModuleBorder)
1067  }
1068 
1069  if (class1 < 100) {
1070  if (firstElehottestDetId.subdetId() == EcalBarrel && firstElectronIsOnModuleBorder) {
1071  h1_borderElectronClassification_->Fill(class1);
1072  return kContinue;
1073  }
1074  }
1075 
1076  if (class2 < 100) {
1077  if (secondElehottestDetId.subdetId() == EcalBarrel && secondElectronIsOnModuleBorder) {
1078  h1_borderElectronClassification_->Fill(class2);
1079  return kContinue;
1080  }
1081  }
1082 
1085 
1086  if (class1 < 100 && class2 < 100) {
1087  BBZN++;
1088  if (class1 == 0 && class2 == 0)
1089  BBZN_gg++;
1090  if (class1 < 21 && class2 < 21)
1091  BBZN_tt++;
1092  if (class1 < 21 || class2 < 21)
1093  BBZN_t0++;
1094  }
1095 
1096  if (class1 >= 100 && class2 >= 100) {
1097  EEZN++;
1098  if (class1 == 100 && class2 == 100)
1099  EEZN_gg++;
1100  if (class1 < 121 && class2 < 121)
1101  EEZN_tt++;
1102  if (class1 < 121 || class2 < 121)
1103  EEZN_t0++;
1104  }
1105 
1106  if ((class1 < 100 && class2 >= 100) || (class2 < 100 && class1 >= 100)) {
1107  EBZN++;
1108  if ((class1 == 0 && class2 == 100) || (class2 == 0 && class1 == 100))
1109  EBZN_gg++;
1110  if ((class1 < 21 && class2 < 121) || (class2 < 21 && class1 < 121))
1111  EBZN_tt++;
1112  if (class2 < 21 || class1 < 21 || class2 < 121 || class1 < 121)
1113  EBZN_t0++;
1114  }
1115 
1117 
1118  if (myBestZ == -1)
1119  return kContinue;
1120 
1121  bool invMassBool = ((mass > minInvMassCut_) && (mass < maxInvMassCut_));
1122 
1123  bool selectionBool = false;
1124  //0 = all electrons (but no crack)
1125 
1127 
1128  float theta1 = 2. * atan(exp(-zeeCandidates[myBestZ].first->getRecoElectron()->superCluster()->eta()));
1129  bool ET_1 = ((zeeCandidates[myBestZ].first->getRecoElectron()->superCluster()->energy() * sin(theta1)) > 20.);
1130 
1131  float theta2 = 2. * atan(exp(-zeeCandidates[myBestZ].second->getRecoElectron()->superCluster()->eta()));
1132  bool ET_2 = ((zeeCandidates[myBestZ].second->getRecoElectron()->superCluster()->energy() * sin(theta2)) > 20.);
1133 
1134  bool HoE_1 = (zeeCandidates[myBestZ].first->getRecoElectron()->hadronicOverEm() < 0.115);
1135  bool HoE_2 = (zeeCandidates[myBestZ].second->getRecoElectron()->hadronicOverEm() < 0.115);
1136 
1137  bool DeltaPhiIn_1 = (zeeCandidates[myBestZ].first->getRecoElectron()->deltaPhiSuperClusterTrackAtVtx() < 0.090);
1138  bool DeltaPhiIn_2 = (zeeCandidates[myBestZ].second->getRecoElectron()->deltaPhiSuperClusterTrackAtVtx() < 0.090);
1139 
1140  bool DeltaEtaIn_1 = (zeeCandidates[myBestZ].first->getRecoElectron()->deltaEtaSuperClusterTrackAtVtx() < 0.0090);
1141  bool DeltaEtaIn_2 = (zeeCandidates[myBestZ].second->getRecoElectron()->deltaEtaSuperClusterTrackAtVtx() < 0.0090);
1142 
1144 
1145  if (!(invMassBool && ET_1 && ET_2 && HoE_1 && HoE_2 && DeltaPhiIn_1 && DeltaPhiIn_2 && DeltaEtaIn_1 && DeltaEtaIn_2))
1146  return kContinue;
1148 
1149  h1_eventsAfterEWKSelection_->Fill(1);
1150 
1152 
1153  int c1st = zeeCandidates[myBestZ].first->getRecoElectron()->classification();
1154  int c2nd = zeeCandidates[myBestZ].second->getRecoElectron()->classification();
1155  if (electronSelection_ == 0)
1156  selectionBool = (myBestZ != -1 && c1st != 40 && c1st != 40 && c2nd != 40 && c2nd != 140);
1157 
1158  //1 = all electrons are Golden, BB or Narrow
1159 
1160  if (electronSelection_ == 1)
1161  selectionBool =
1162  (myBestZ != -1 && (c1st == 0 || c1st == 10 || c1st == 20 || c1st == 100 || c1st == 110 || c1st == 120) &&
1163  (c2nd == 0 || c2nd == 10 || c2nd == 20 || c2nd == 100 || c2nd == 110 || c2nd == 120));
1164 
1165  //2 = all electrons are Golden
1166  if (electronSelection_ == 2)
1167  selectionBool = (myBestZ != -1 && (c1st == 0 || c1st == 100) && (c2nd == 0 || c2nd == 100));
1168  //3 = all electrons are showering
1169  if (electronSelection_ == 3)
1170  selectionBool = (myBestZ != -1 && ((c1st >= 30 && c1st <= 34) || ((c1st >= 130 && c1st <= 134))) &&
1171  ((c2nd >= 30 && c2nd <= 34) || ((c2nd >= 130 && c2nd <= 134)))
1172 
1173  );
1174 
1175  //4 = all Barrel electrons are Golden, BB or Narrow; take all Endcap electrons
1176 
1177  if (electronSelection_ == 4)
1178  selectionBool = (myBestZ != -1 && (
1179 
1180  ((c1st == 0 || c1st == 10 || c1st == 20) && c2nd >= 100 && c2nd != 140)
1181 
1182  ||
1183 
1184  ((c2nd == 0 || c2nd == 10 || c2nd == 20) && c1st >= 100 && c1st != 140)
1185 
1186  ));
1187 
1188  //5 = all Endcap electrons (but no crack)
1189 
1190  if (electronSelection_ == 5)
1191  selectionBool = (myBestZ != -1 && c1st >= 100 && c2nd >= 100 && c1st != 140 && c2nd != 140);
1192 
1193  //6 = all Barrel electrons (but no crack)
1194 
1195  if (electronSelection_ == 6)
1196  selectionBool = (myBestZ != -1 && c1st < 100 && c2nd < 100 && c1st != 40 && c2nd != 40);
1197 
1198  //7 = this eliminates the events which have 1 ele in the Barrel and 1 in the Endcap
1199 
1200  if (electronSelection_ == 7)
1201  selectionBool = (myBestZ != -1 && !(c1st < 100 && c2nd >= 100) && !(c1st >= 100 && c2nd < 100));
1202 
1203  float ele1EnergyCorrection(1.);
1204  float ele2EnergyCorrection(1.);
1205 
1206  if (invMassBool && selectionBool && wantEtaCorrection_) {
1207  ele1EnergyCorrection = getEtaCorrection(zeeCandidates[myBestZ].first->getRecoElectron());
1208  ele2EnergyCorrection = getEtaCorrection(zeeCandidates[myBestZ].second->getRecoElectron());
1209  }
1210 
1211  if (invMassBool && selectionBool) {
1213  ZeeKinematicTools::cosThetaElectrons_SC(zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1215  ZeeKinematicTools::cosThetaElectrons_TK(zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1217  ZeeKinematicTools::cosThetaElectrons_SC(zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection) /
1219  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection) -
1220  1.);
1221 
1222  if (!mcProducer_.empty()) {
1223  h1_zMassResol_->Fill(mass - myGenZMass);
1224 
1225  //reco-mc association map - begin
1226 
1227  std::map<HepMC::GenParticle*, const reco::GsfElectron*> myMCmap;
1228 
1229  std::vector<const reco::GsfElectron*> dauElectronCollection;
1230 
1231  dauElectronCollection.push_back(zeeCandidates[myBestZ].first->getRecoElectron());
1232  dauElectronCollection.push_back(zeeCandidates[myBestZ].second->getRecoElectron());
1233 
1234  fillMCmap(&dauElectronCollection, mcEle, myMCmap);
1235  fillEleInfo(mcEle, myMCmap);
1236  //h_DiffZMassDistr_[loopFlag_]->Fill( (mass-myGenZMass) );
1237  }
1238 
1239  //PUT f(eta) IN OUR Zee ALGORITHM
1240  theAlgorithm_->addEvent(zeeCandidates[myBestZ].first,
1241  zeeCandidates[myBestZ].second,
1242  MZ * sqrt(ele1EnergyCorrection * ele2EnergyCorrection));
1243 
1244  h1_reco_ZMass_->Fill(ZeeKinematicTools::calculateZMass_withTK(zeeCandidates[myBestZ]));
1245 
1247  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1248 
1249  int c1st = zeeCandidates[myBestZ].first->getRecoElectron()->classification();
1250  int c2nd = zeeCandidates[myBestZ].second->getRecoElectron()->classification();
1251  if (c1st < 100 && c2nd < 100)
1253  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1254 
1255  if (c1st >= 100 && c2nd >= 100)
1257  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection));
1258 
1260  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection);
1261 
1263  zeeCandidates[myBestZ], ele1EnergyCorrection, ele2EnergyCorrection) -
1264  myGenZMass;
1265 
1266  // h_ZMassDistr_[loopFlag_]->Fill(ZeeKinematicTools::calculateZMassWithCorrectedElectrons_withTK(zeeCandidates[myBestZ],ele1EnergyCorrection,ele2EnergyCorrection));
1267 
1268  myTree->Fill();
1269  }
1270 
1271 #ifdef DEBUG
1272  std::cout << "Added event to algorithm" << std::endl;
1273 #endif
1274 
1275  return kContinue;
1276 }
bool accept() const
Has at least one path accepted the event?
const edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
std::string calibMode_
static void setCaloGeometry(const CaloGeometry *geometry)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
int BARREL_ELECTRONS_AFTER_BORDER_CUT
void fillEleInfo(std::vector< HepMC::GenParticle *> &a, std::map< HepMC::GenParticle *, const reco::GsfElectron *> &b)
TH1F * h1_eventsBeforeEWKSelection_
float calibCoeff[250]
void fillEleInfo(const reco::GsfElectronCollection *)
Definition: ZeePlots.cc:220
void fillEleMCInfo(const HepMC::GenEvent *)
Definition: ZeePlots.cc:178
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_
int GOLDEN_ELECTRONS_IN_ENDCAP
void fillZMCInfo(const HepMC::GenEvent *)
Definition: ZeePlots.cc:132
TH1F * h1_eventsAfterBorderSelection_
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T const * product() const
Definition: Handle.h:70
void fillZInfo(std::pair< calib::CalibElectron *, calib::CalibElectron *> myZeeCandidate)
Definition: ZeePlots.cc:100
#define MZ
bool addEvent(calib::CalibElectron *, calib::CalibElectron *, float)
TH1F * h1_eventsBeforeBorderSelection_
TH1F * h1_electronCosTheta_SC_
TH1F * h1_reco_ZMassCorr_
int GOLDEN_ELECTRONS_IN_BARREL
std::string endcapfile_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static std::vector< DetId > getDetIdsInRing(short aRingIndex)
Retrieve the DetIds in a phi-ring.
const edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
U second(std::pair< T, U > const &p)
TH1F * h1_electronCosTheta_TK_
unsigned int size() const
Get number of paths stored.
int iEvent
Definition: GenABIO.cc:224
const EcalIntercalibConstants & get()
TupleMultiplicity< TrackerTraits > const *__restrict__ TrackingRecHitSoAConstView< TrackerTraits > TrackerTraits::tindex_type *__restrict__ double *__restrict__ phits
int SILVER_ELECTRONS_IN_BARREL
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
int TOTAL_ELECTRONS_IN_ENDCAP
int BARREL_ELECTRONS_BEFORE_BORDER_CUT
T sqrt(T t)
Definition: SSEVec.h:19
void fillHLTInfo(edm::Handle< edm::TriggerResults >)
Definition: ZeePlots.cc:299
int SHOWER_ELECTRONS_IN_ENDCAP
static float calculateZMassWithCorrectedElectrons_withTK(const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
static float cosThetaElectrons_TK(const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static float calculateZMass_withTK(const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
ZIterativeAlgorithmWithFit * theAlgorithm_
const edm::EDGetTokenT< reco::SuperClusterCollection > islandSCToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
unsigned int electronSelection_
bool xtalIsOnModuleBorder(EBDetId myEBDetId)
TH1F * h1_eventsAfterEWKSelection_
static std::vector< DetId > getDetIdsInModule(short int)
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
const_iterator find(uint32_t rawId) const
TH1F * h1_electronCosTheta_SC_TK_
void fillMCmap(const std::vector< const reco::GsfElectron *> *electronCollection, const std::vector< HepMC::GenParticle *> &mcEle, std::map< HepMC::GenParticle *, const reco::GsfElectron *> &myMCmap)
Definition: DetId.h:17
const edm::EDGetTokenT< reco::SuperClusterCollection > scToken_
ZeePlots * myZeePlots_
std::pair< DetId, double > getHottestDetId(const std::vector< std::pair< DetId, float > > &mySCRecHits, const EBRecHitCollection *ebhits, const EERecHitCollection *eehits)
TH2F * h2_xtalMiscalibCoeffEndcapPlus_
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
const std::string mcProducer_
static std::vector< DetId > getDetIdsInECAL()
bool isValid() const
Definition: HandleBase.h:70
float initCalibCoeff[250]
int SILVER_ELECTRONS_IN_ENDCAP
TH1F * h1_reco_ZMassCorrBB_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronToken_
HLT enums.
TH1F * h1_reco_ZMassCorrEE_
TH2F * h2_xtalMiscalibCoeffBarrel_
std::string barrelfile_
float calibCoeffError[250]
int CRACK_ELECTRONS_IN_ENDCAP
int CRACK_ELECTRONS_IN_BARREL
double getEtaCorrection(const reco::GsfElectron *)
static float cosThetaElectrons_SC(const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
bool aHLTResults[200]
TH1F * h1_borderElectronClassification_
TH2F * h2_xtalMiscalibCoeffEndcapMinus_
int SHOWER_ELECTRONS_IN_BARREL
int TOTAL_ELECTRONS_IN_BARREL
std::shared_ptr< EcalIntercalibConstants > ical

◆ 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 146 of file ZeeCalibration.cc.

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, l1ctLayer2EG_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.

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

◆ 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 1295 of file ZeeCalibration.cc.

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().

1295  {
1296  double par[3];
1297  double errpar[3];
1298  double zChi2;
1299  int zIters;
1300 
1301  ZIterativeAlgorithmWithFit::gausfit(h1_reco_ZMass_, par, errpar, 2., 2., &zChi2, &zIters);
1302 
1303  h2_zMassVsLoop_->Fill(loopFlag_, par[1]);
1304 
1305  h2_zMassDiffVsLoop_->Fill(loopFlag_, (par[1] - MZ) / MZ);
1306 
1307  h2_zWidthVsLoop_->Fill(loopFlag_, par[2]);
1308 
1310 
1311  std::cout << "[ZeeCalibration] Ending loop " << iLoop << std::endl;
1312  //RUN the algorithm
1314 
1315  const std::vector<float>& optimizedCoefficients = theAlgorithm_->getOptimizedCoefficients();
1316  const std::vector<float>& optimizedCoefficientsError = theAlgorithm_->getOptimizedCoefficientsError();
1317  //const std::vector<float>& weightSum = theAlgorithm_->getWeightSum();
1318  const std::vector<float>& optimizedChi2 = theAlgorithm_->getOptimizedChiSquare();
1319  const std::vector<int>& optimizedIterations = theAlgorithm_->getOptimizedIterations();
1320 
1321  //#ifdef DEBUG
1322  std::cout << "Optimized coefficients " << optimizedCoefficients.size() << std::endl;
1323  //#endif
1324 
1325  // h2_coeffVsLoop_->Fill(loopFlag_, optimizedCoefficients[75]); //show the evolution of just 1 ring coefficient (well chosen...)
1326 
1328  for (unsigned int ieta = 0; ieta < optimizedCoefficients.size(); ieta++) {
1329  NewCalibCoeff[ieta] = calibCoeff[ieta] * optimizedCoefficients[ieta];
1330 
1331  h2_chi2_[loopFlag_]->Fill(ringNumberCorrector(ieta), optimizedChi2[ieta]);
1332  h2_iterations_[loopFlag_]->Fill(ringNumberCorrector(ieta), optimizedIterations[ieta]);
1333  }
1335 
1337  computeCoefficientDistanceAtIteration(calibCoeff, NewCalibCoeff, optimizedCoefficients.size());
1338 
1339  std::cout << "Iteration # : " << loopFlag_ << " CoefficientDistanceAtIteration "
1340  << coefficientDistanceAtIteration[loopFlag_] << std::endl;
1341  std::cout << "size " << optimizedCoefficients.size() << std::endl;
1342 
1343  for (unsigned int ieta = 0; ieta < optimizedCoefficients.size(); ieta++) {
1344  calibCoeff[ieta] *= optimizedCoefficients[ieta];
1346  calibCoeff[ieta] * sqrt(pow(optimizedCoefficientsError[ieta] / optimizedCoefficients[ieta], 2) +
1348  //calibCoeffError[ieta] = optimizedCoefficientsError[ieta];
1349 
1350 #ifdef DEBUG
1351  std::cout << ieta << " " << optimizedCoefficients[ieta] << std::endl;
1352 #endif
1353 
1354  std::vector<DetId> ringIds;
1355 
1356  if (calibMode_ == "RING")
1358 
1359  if (calibMode_ == "MODULE")
1361 
1362  if (calibMode_ == "ABS_SCALE" || calibMode_ == "ETA_ET_MODE")
1364 
1365  for (unsigned int iid = 0; iid < ringIds.size(); ++iid) {
1366  if (ringIds[iid].subdetId() == EcalBarrel) {
1367  EBDetId myEBDetId(ringIds[iid]);
1368  h2_xtalRecalibCoeffBarrel_[loopFlag_]->SetBinContent(
1369  myEBDetId.ieta() + 86,
1370  myEBDetId.iphi(),
1371  100 * (calibCoeff[ieta] * initCalibCoeff[ieta] - 1.)); //fill TH2 with recalibCoeff
1372  }
1373 
1374  if (ringIds[iid].subdetId() == EcalEndcap) {
1375  EEDetId myEEDetId(ringIds[iid]);
1376  if (myEEDetId.zside() < 0)
1378  myEEDetId.ix(),
1379  myEEDetId.iy(),
1380  100 * (calibCoeff[ieta] * initCalibCoeff[ieta] - 1.)); //fill TH2 with recalibCoeff
1381 
1382  if (myEEDetId.zside() > 0)
1383  h2_xtalRecalibCoeffEndcapPlus_[loopFlag_]->SetBinContent(
1384  myEEDetId.ix(),
1385  myEEDetId.iy(),
1386  100 * (calibCoeff[ieta] * initCalibCoeff[ieta] - 1.)); //fill TH2 with recalibCoeff
1387  }
1388 
1389  ical->setValue(ringIds[iid], *(ical->getMap().find(ringIds[iid])) * optimizedCoefficients[ieta]);
1390  }
1391  }
1392 
1394 
1395  for (int k = 0; k < theAlgorithm_->getNumberOfChannels(); k++) {
1396  bool isNearCrack =
1397  (abs(ringNumberCorrector(k)) == 1 || abs(ringNumberCorrector(k)) == 25 || abs(ringNumberCorrector(k)) == 26 ||
1398  abs(ringNumberCorrector(k)) == 45 || abs(ringNumberCorrector(k)) == 46 || abs(ringNumberCorrector(k)) == 65 ||
1399  abs(ringNumberCorrector(k)) == 66 || abs(ringNumberCorrector(k)) == 85 || abs(ringNumberCorrector(k)) == 86 ||
1400  abs(ringNumberCorrector(k)) == 124);
1401 
1402  if (!isNearCrack) {
1403  // h2_miscalRecalParz_[iLoop]->Fill( initCalibCoeff[k], 1./calibCoeff[k] );
1404  h1_mcParz_[iLoop]->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
1405 
1406  if (k < 170) {
1407  //h2_miscalRecalEBParz_[iLoop]->Fill( initCalibCoeff[k], 1./calibCoeff[k] );
1408  h1_mcEBParz_[iLoop]->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
1409  }
1410 
1411  if (k >= 170) {
1412  //h2_miscalRecalEEParz_[iLoop]->Fill( initCalibCoeff[k], 1./calibCoeff[k] );
1413  h1_mcEEParz_[iLoop]->Fill(initCalibCoeff[k] * calibCoeff[k] - 1.);
1414  }
1415  }
1416  }
1417 
1419  double parResidual[3];
1420  double errparResidual[3];
1421  double zResChi2;
1422  int zResIters;
1423 
1424  ZIterativeAlgorithmWithFit::gausfit(h1_mcParz_[iLoop], parResidual, errparResidual, 3., 3., &zResChi2, &zResIters);
1425  //h1_mcParz_[iLoop]->Fit("gaus");
1426 
1427  h2_residualSigma_->Fill(loopFlag_ + 1, parResidual[2]);
1428  loopArray[loopFlag_] = loopFlag_ + 1;
1429  sigmaArray[loopFlag_] = parResidual[2];
1430  sigmaErrorArray[loopFlag_] = errparResidual[2];
1431 
1432  std::cout << "Fit on residuals, sigma is " << parResidual[2] << " +/- " << errparResidual[2] << std::endl;
1433 
1435  outputFile_->cd();
1436 
1437  // h2_miscalRecalParz_[iLoop]->Write();
1438  h1_mcParz_[iLoop]->Write();
1439 
1440  //h2_miscalRecalEBParz_[iLoop]->Write();
1441  h1_mcEBParz_[iLoop]->Write();
1442 
1443  //h2_miscalRecalEEParz_[iLoop]->Write();
1444  h1_mcEEParz_[iLoop]->Write();
1448 
1450 
1451  loopFlag_++;
1452 
1453 #ifdef DEBUG
1454  std::cout << " loopFlag_ is " << loopFlag_ << std::endl;
1455 #endif
1456 
1457  if (iLoop == theMaxLoops - 1 || iLoop >= theMaxLoops)
1458  return kStop;
1459  else
1460  return kContinue;
1461 }
TH1F * h1_mcEEParz_[25]
std::string calibMode_
const std::vector< float > & getOptimizedCoefficientsError() const
float computeCoefficientDistanceAtIteration(float v1[250], float v2[250], int size)
float calibCoeff[250]
unsigned int theMaxLoops
#define MZ
static void gausfit(TH1F *histoou, double *par, double *errpar, float nsigmalow, float nsigmaup, double *mychi2, int *iterations)
static std::vector< DetId > getDetIdsInRing(short aRingIndex)
Retrieve the DetIds in a phi-ring.
int ringNumberCorrector(int k)
double sigmaArray[50]
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1F * h1_mcEBParz_[25]
ZIterativeAlgorithmWithFit * theAlgorithm_
TH2F * h2_xtalRecalibCoeffBarrel_[25]
static std::vector< DetId > getDetIdsInModule(short int)
double coefficientDistanceAtIteration[50]
TH2F * h2_zMassDiffVsLoop_
TH1F * h1_mcParz_[25]
const std::vector< int > & getOptimizedIterations() const
double loopArray[50]
static std::vector< DetId > getDetIdsInECAL()
float initCalibCoeff[250]
const std::vector< float > & getOptimizedCoefficients() const
TH2F * h2_chi2_[25]
const std::vector< float > & getOptimizedChiSquare() const
TH2F * h2_zMassVsLoop_
TH2F * h2_iterations_[25]
float NewCalibCoeff[250]
float calibCoeffError[250]
TH2F * h2_xtalRecalibCoeffEndcapPlus_[25]
TH2F * h2_xtalRecalibCoeffEndcapMinus_[25]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
TH2F * h2_zWidthVsLoop_
double sigmaErrorArray[50]
TH2F * h2_residualSigma_
std::shared_ptr< EcalIntercalibConstants > ical

◆ EvalDPhi()

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

Definition at line 1819 of file ZeeCalibration.cc.

References VtxSmearedParameters_cfi::Phi, and Pi.

1819  {
1820  if (Phi < 0)
1821  Phi = 2 * TMath::Pi() + Phi;
1822  if (Phi_ref < 0)
1823  Phi_ref = 2 * TMath::Pi() + Phi_ref;
1824  return (Phi - Phi_ref);
1825 }
const double Pi

◆ EvalDR()

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

Definition at line 1804 of file ZeeCalibration.cc.

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

Referenced by fillMCmap().

1804  {
1805  if (Phi < 0)
1806  Phi = 2 * TMath::Pi() + Phi;
1807  if (Phi_ref < 0)
1808  Phi_ref = 2 * TMath::Pi() + Phi_ref;
1809  float DPhi = Phi - Phi_ref;
1810  if (fabs(DPhi) > TMath::Pi())
1811  DPhi = 2 * TMath::Pi() - fabs(DPhi);
1812 
1813  float DEta = Eta - Eta_ref;
1814 
1815  float DR = sqrt(DEta * DEta + DPhi * DPhi);
1816  return DR;
1817 }
const double Pi
T sqrt(T t)
Definition: SSEVec.h:19
float DPhi(float phi1, float phi2)
Definition: L1Clustering.h:127

◆ fEtaBarrelBad()

double ZeeCalibration::fEtaBarrelBad ( double  scEta) const
private

Definition at line 1740 of file ZeeCalibration.cc.

References LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, and x.

Referenced by getEtaCorrection().

1740  {
1741  float p0 = 1.00153e+00;
1742  float p1 = 3.29331e-02;
1743  float p2 = 1.21187e-03;
1744 
1745  double x = (double)fabs(scEta);
1746 
1747  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1748 }

◆ fEtaBarrelGood()

double ZeeCalibration::fEtaBarrelGood ( double  scEta) const
private

Definition at line 1772 of file ZeeCalibration.cc.

References LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, and x.

Referenced by getEtaCorrection().

1772  {
1773  float p0 = 9.99782e-01;
1774  float p1 = 1.26983e-02;
1775  float p2 = 2.16344e-03;
1776 
1777  double x = (double)fabs(scEta);
1778 
1779  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1780 }

◆ fEtaEndcapBad()

double ZeeCalibration::fEtaEndcapBad ( double  scEta) const
private

Definition at line 1762 of file ZeeCalibration.cc.

References LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, and x.

Referenced by getEtaCorrection().

1762  {
1763  float p0 = 1.17382e+00;
1764  float p1 = -6.52319e-02;
1765  float p2 = 6.26108e-03;
1766 
1767  double x = (double)fabs(scEta);
1768 
1769  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1770 }

◆ fEtaEndcapGood()

double ZeeCalibration::fEtaEndcapGood ( double  scEta) const
private

Definition at line 1750 of file ZeeCalibration.cc.

References LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, and x.

Referenced by getEtaCorrection().

1750  {
1751  // f(eta) for the first 3 classes (100, 110 and 120)
1752  // Ivica's new corrections 01/06
1753  float p0 = 1.06819e+00;
1754  float p1 = -1.53189e-02;
1755  float p2 = 4.01707e-04;
1756 
1757  double x = (double)fabs(scEta);
1758 
1759  return 1. / (p0 + p1 * x * x + p2 * x * x * x * x);
1760 }

◆ fillEleInfo()

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

Definition at line 1827 of file ZeeCalibration.cc.

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().

1828  {
1829  for (unsigned int i = 0; i < mcEle.size(); i++) {
1830  h_eleEffEta_[0]->Fill(fabs(mcEle[i]->momentum().pseudoRapidity()));
1831  h_eleEffPhi_[0]->Fill(mcEle[i]->momentum().phi());
1832  h_eleEffPt_[0]->Fill(mcEle[i]->momentum().perp());
1833 
1834  std::map<HepMC::GenParticle*, const reco::GsfElectron*>::const_iterator mIter = associationMap.find(mcEle[i]);
1835  if (mIter == associationMap.end())
1836  continue;
1837 
1838  if ((*mIter).second) {
1839  const reco::GsfElectron* myEle = (*mIter).second;
1840 
1841  h_eleEffEta_[1]->Fill(fabs(mcEle[i]->momentum().pseudoRapidity()));
1842  h_eleEffPhi_[1]->Fill(mcEle[i]->momentum().phi());
1843  h_eleEffPt_[1]->Fill(mcEle[i]->momentum().perp());
1844  h1_eleEtaResol_->Fill(myEle->eta() - mcEle[i]->momentum().eta());
1845  h1_elePhiResol_->Fill(myEle->phi() - mcEle[i]->momentum().phi());
1846 
1847  const reco::SuperCluster* mySC = &(*(myEle->superCluster()));
1848  if (/*fabs(mySC->position().eta()) < 2.4*/ true) {
1849  // if(myEle->classification()>=100)std::cout<<"mySC->preshowerEnergy()"<<mySC->preshowerEnergy()<<std::endl;
1850 
1851  h_ESCEtrue_[loopFlag_]->Fill(mySC->energy() / mcEle[i]->momentum().e());
1852  h_ESCEtrueVsEta_[loopFlag_]->Fill(fabs(mySC->position().eta()), mySC->energy() / mcEle[i]->momentum().e());
1853 
1854  double corrSCenergy = (mySC->energy()) / getEtaCorrection(myEle);
1855  h_ESCcorrEtrue_[loopFlag_]->Fill(corrSCenergy / mcEle[i]->momentum().e());
1856  h_ESCcorrEtrueVsEta_[loopFlag_]->Fill(fabs(mySC->position().eta()), corrSCenergy / mcEle[i]->momentum().e());
1857 
1858  // std::vector<DetId> mySCRecHits = mySC->seed()->getHitsByDetId();
1859 
1860  h1_seedOverSC_->Fill(mySC->seed()->energy() / mySC->energy());
1861  h1_preshowerOverSC_->Fill(mySC->preshowerEnergy() / mySC->energy());
1862  }
1863  }
1864  }
1865 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
TH1F * h_eleEffPhi_[2]
TH1F * h_ESCEtrue_[25]
TH2F * h_ESCcorrEtrueVsEta_[25]
TH1F * h1_elePhiResol_
TH1F * h1_eleEtaResol_
T perp() const
Magnitude of transverse component.
TH1F * h1_preshowerOverSC_
TH1F * h_eleEffPt_[2]
double energy() const
cluster energy
Definition: CaloCluster.h:149
TH1F * h_ESCcorrEtrue_[25]
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:79
TH2F * h_ESCEtrueVsEta_[25]
double phi() const final
momentum azimuthal angle
double getEtaCorrection(const reco::GsfElectron *)
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:63
TH1F * h_eleEffEta_[2]
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
double eta() const final
momentum pseudorapidity

◆ 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 1784 of file ZeeCalibration.cc.

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

Referenced by duringLoop().

1786  {
1787  for (unsigned int i = 0; i < mcEle.size(); i++) {
1788  float minDR = 0.1;
1789  const reco::GsfElectron* myMatchEle = nullptr;
1790  for (unsigned int j = 0; j < electronCollection->size(); j++) {
1791  float dr = EvalDR(mcEle[i]->momentum().pseudoRapidity(),
1792  (*(*electronCollection)[j]).eta(),
1793  mcEle[i]->momentum().phi(),
1794  (*(*electronCollection)[j]).phi());
1795  if (dr < minDR) {
1796  myMatchEle = (*electronCollection)[j];
1797  minDR = dr;
1798  }
1799  }
1800  myMCmap.insert(std::pair<HepMC::GenParticle*, const reco::GsfElectron*>(mcEle[i], myMatchEle));
1801  }
1802 }
float EvalDR(float Eta, float Eta_ref, float Phi, float Phi_ref)

◆ getEtaCorrection()

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

Definition at line 1895 of file ZeeCalibration.cc.

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

Referenced by duringLoop(), and fillEleInfo().

1895  {
1896  double correction(1.);
1897 
1898  int c = ele->classification();
1899  if (c == 0 || c == 10 || c == 20)
1900  correction = fEtaBarrelGood(ele->superCluster()->eta());
1901 
1902  if (c == 100 || c == 110 || c == 120)
1903  correction = fEtaEndcapGood(ele->superCluster()->eta());
1904 
1905  if (c == 30 || c == 31 || c == 32 || c == 33 || c == 34)
1906  correction = fEtaBarrelBad(ele->superCluster()->eta());
1907 
1908  if (c == 130 || c == 131 || c == 132 || c == 133 || c == 134)
1909  correction = fEtaEndcapBad(ele->superCluster()->eta());
1910 
1911  return correction;
1912 }
Classification classification() const
Definition: GsfElectron.h:805
double fEtaBarrelBad(double scEta) const
double fEtaEndcapGood(double scEta) const
double fEtaBarrelGood(double scEta) const
double fEtaEndcapBad(double scEta) const
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155

◆ 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 1914 of file ZeeCalibration.cc.

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().

1916  {
1917  double maxEnergy = -9999.;
1918  const EcalRecHit* hottestRecHit = nullptr;
1919 
1920  std::pair<DetId, double> myPair(DetId(0), -9999.);
1921 
1922  for (std::vector<std::pair<DetId, float> >::const_iterator idIt = mySCRecHits.begin(); idIt != mySCRecHits.end();
1923  idIt++) {
1924  if (idIt->first.subdetId() == EcalBarrel) {
1925  hottestRecHit = &(*(ebhits->find((*idIt).first)));
1926 
1927  if (hottestRecHit == &(*(ebhits->end()))) {
1928  std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@ NO RECHIT FOUND SHOULD NEVER HAPPEN" << std::endl;
1929  continue;
1930  }
1931  } else if (idIt->first.subdetId() == EcalEndcap) {
1932  hottestRecHit = &(*(eehits->find((*idIt).first)));
1933  if (hottestRecHit == &(*(eehits->end()))) {
1934  std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@ NO RECHIT FOUND SHOULD NEVER HAPPEN" << std::endl;
1935  continue;
1936  }
1937  }
1938 
1939  //std::cout<<"[getHottestDetId] hottestRecHit->energy() "<<hottestRecHit->energy()<<std::endl;
1940 
1941  if (hottestRecHit && hottestRecHit->energy() > maxEnergy) {
1942  maxEnergy = hottestRecHit->energy();
1943 
1944  myPair.first = hottestRecHit->id();
1945  myPair.second = maxEnergy;
1946  }
1947 
1948  } //end loop to find hottest RecHit
1949 
1950  //std::cout<<"[ZeeCalibration::getHottestDetId] going to return..."<<std::endl;
1951 
1952  return myPair;
1953 }
const_iterator end() const
Definition: DetId.h:17
DetId id() const
get the id
Definition: EcalRecHit.h:77
iterator find(key_type k)
float energy() const
Definition: EcalRecHit.h:68

◆ printStatistics()

void ZeeCalibration::printStatistics ( )
private

Definition at line 2078 of file ZeeCalibration.cc.

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().

2078  {
2079  std::cout << "[ CHECK ON BARREL ELECTRON NUMBER ]"
2080  << " first " << BARREL_ELECTRONS_BEFORE_BORDER_CUT << " second " << TOTAL_ELECTRONS_IN_BARREL << std::endl;
2081 
2082  std::cout << "[ EFFICIENCY OF THE BORDER SELECTION ]"
2084 
2085  std::cout << "[ EFFICIENCY OF THE GOLDEN SELECTION ] BARREL: "
2087  << " ENDCAP: " << (float)GOLDEN_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2088 
2089  std::cout << "[ EFFICIENCY OF THE SILVER SELECTION ] BARREL: "
2091  << " ENDCAP: " << (float)SILVER_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2092 
2093  std::cout << "[ EFFICIENCY OF THE SHOWER SELECTION ] BARREL: "
2095  << " ENDCAP: " << (float)SHOWER_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2096 
2097  std::cout << "[ EFFICIENCY OF THE CRACK SELECTION ] BARREL: "
2099  << " ENDCAP: " << (float)CRACK_ELECTRONS_IN_ENDCAP / (float)TOTAL_ELECTRONS_IN_ENDCAP << std::endl;
2100 
2101  std::ofstream fout("ZeeStatistics.txt");
2102 
2103  if (!fout) {
2104  std::cout << "Cannot open output file.\n";
2105  }
2106 
2107  fout << "ZeeStatistics" << std::endl;
2108 
2109  fout << "##########################RECO#########################" << std::endl;
2110  fout << "##################Zee with Barrel-Barrel electrons: " << BBZN << std::endl;
2111 
2112  fout << "Golden-Golden fraction: " << (float)BBZN_gg / BBZN << " 3-3 fraction is " << (float)BBZN_tt / BBZN
2113  << " 3-whatever fraction is " << (float)BBZN_t0 / BBZN << std::endl;
2114  fout << "##################Zee with Barrel-Endcap electrons: " << EBZN << std::endl;
2115  fout << "Golden-Golden fraction: " << (float)EBZN_gg / EBZN << " 3-3 fraction is " << (float)EBZN_tt / EBZN
2116  << " 3-whatever fraction is " << (float)EBZN_t0 / EBZN << std::endl;
2117  fout << "##################Zee with Endcap-Endcap electrons: " << EEZN << std::endl;
2118  fout << "Golden-Golden fraction: " << (float)EEZN_gg / EEZN << " 3-3 fraction is " << (float)EEZN_tt / EEZN
2119  << " 3-whatever fraction is " << (float)EEZN_t0 / EEZN << std::endl;
2120 
2121  fout << "\n" << std::endl;
2122 
2123  fout << "##########################GEN#########################" << std::endl;
2124  fout << "##################Zee with Barrel-Barrel electrons: " << (float)MCZBB / NEVT << std::endl;
2125  fout << "##################Zee with Barrel-Endcap electrons: " << (float)MCZEB / NEVT << std::endl;
2126  fout << "##################Zee with Endcap-Endcap electrons: " << (float)MCZEE / NEVT << std::endl;
2127 
2128  fout.close();
2129 }
int BARREL_ELECTRONS_AFTER_BORDER_CUT
int GOLDEN_ELECTRONS_IN_ENDCAP
int GOLDEN_ELECTRONS_IN_BARREL
int SILVER_ELECTRONS_IN_BARREL
int TOTAL_ELECTRONS_IN_ENDCAP
int BARREL_ELECTRONS_BEFORE_BORDER_CUT
int SHOWER_ELECTRONS_IN_ENDCAP
int SILVER_ELECTRONS_IN_ENDCAP
int CRACK_ELECTRONS_IN_ENDCAP
int CRACK_ELECTRONS_IN_BARREL
int SHOWER_ELECTRONS_IN_BARREL
int TOTAL_ELECTRONS_IN_BARREL

◆ produce()

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

Dummy implementation (job done in duringLoop)

Definition at line 77 of file ZeeCalibration.h.

77 {};

◆ produceEcalIntercalibConstants()

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

Produce Ecal interCalibrations.

Definition at line 137 of file ZeeCalibration.cc.

References gather_cfg::cout, and ical.

Referenced by ZeeCalibration().

138  {
139  std::cout << "@SUB=ZeeCalibration::produceEcalIntercalibConstants" << std::endl;
140  return ical;
141 }
std::shared_ptr< EcalIntercalibConstants > ical

◆ resetHistograms()

void ZeeCalibration::resetHistograms ( )
private

Definition at line 2034 of file ZeeCalibration.cc.

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().

2034  {
2036  h1_eventsAfterEWKSelection_->Reset();
2037 
2040 
2041  for (int i = 0; i < 2; i++) {
2042  h_eleEffEta_[i]->Reset();
2043  h_eleEffPhi_[i]->Reset();
2044  h_eleEffPt_[i]->Reset();
2045  }
2046 
2047  h1_seedOverSC_->Reset();
2048  h1_preshowerOverSC_->Reset();
2049 
2050  h1_eleEtaResol_->Reset();
2051  h1_elePhiResol_->Reset();
2052 
2053  h1_zMassResol_->Reset();
2054 
2055  h1_electronCosTheta_TK_->Reset();
2056  h1_electronCosTheta_SC_->Reset();
2057  h1_electronCosTheta_SC_TK_->Reset();
2058 
2059  h2_fEtaBarrelGood_->Reset();
2060  h2_fEtaBarrelBad_->Reset();
2061  h2_fEtaEndcapGood_->Reset();
2062  h2_fEtaEndcapBad_->Reset();
2063  h1_eleClasses_->Reset();
2064 
2065  h1_ZCandMult_->Reset();
2066  h1_reco_ZMass_->Reset();
2067  h1_reco_ZMassCorr_->Reset();
2068  h1_reco_ZMassCorrBB_->Reset();
2069  h1_reco_ZMassCorrEE_->Reset();
2070  h1_occupancyVsEta_->Reset();
2071  h1_occupancy_->Reset();
2072  h1_occupancyBarrel_->Reset();
2073  h1_occupancyEndcap_->Reset();
2074 
2075  return;
2076 }
TH2F * h2_fEtaBarrelBad_
TH1F * h_eleEffPhi_[2]
TH1F * h1_eventsBeforeEWKSelection_
TH1F * h1_eventsAfterBorderSelection_
TH1F * h1_occupancyEndcap_
TH1F * h1_eventsBeforeBorderSelection_
TH1F * h1_electronCosTheta_SC_
TH1F * h1_reco_ZMassCorr_
TH1F * h1_occupancyVsEta_
TH1F * h1_occupancyBarrel_
TH1F * h1_electronCosTheta_TK_
TH2F * h2_fEtaEndcapBad_
TH1F * h1_elePhiResol_
TH1F * h1_eleEtaResol_
TH1F * h1_eventsAfterEWKSelection_
TH1F * h1_preshowerOverSC_
TH1F * h1_electronCosTheta_SC_TK_
TH1F * h_eleEffPt_[2]
TH1F * h1_reco_ZMassCorrBB_
TH1F * h1_reco_ZMassCorrEE_
TH2F * h2_fEtaEndcapGood_
TH2F * h2_fEtaBarrelGood_
TH1F * h_eleEffEta_[2]

◆ resetVariables()

void ZeeCalibration::resetVariables ( )
private

Definition at line 2000 of file ZeeCalibration.cc.

References BARREL_ELECTRONS_AFTER_BORDER_CUT, BARREL_ELECTRONS_BEFORE_BORDER_CUT, BBZN, BBZN_gg, BBZN_t0, BBZN_tt, CRACK_ELECTRONS_IN_BARREL, CRACK_ELECTRONS_IN_ENDCAP, EBZN, EBZN_gg, EBZN_t0, EBZN_tt, EEZN, EEZN_gg, EEZN_t0, EEZN_tt, GOLDEN_ELECTRONS_IN_BARREL, GOLDEN_ELECTRONS_IN_ENDCAP, 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 startingNewLoop().

2000  {
2001  BBZN = 0;
2002  EBZN = 0;
2003  EEZN = 0;
2004  BBZN_gg = 0;
2005  EBZN_gg = 0;
2006  EEZN_gg = 0;
2007 
2008  BBZN_tt = 0;
2009  EBZN_tt = 0;
2010  EEZN_tt = 0;
2011 
2012  BBZN_t0 = 0;
2013  EBZN_t0 = 0;
2014  EEZN_t0 = 0;
2015 
2018 
2027 
2030 
2031  return;
2032 }
int BARREL_ELECTRONS_AFTER_BORDER_CUT
int GOLDEN_ELECTRONS_IN_ENDCAP
int GOLDEN_ELECTRONS_IN_BARREL
int SILVER_ELECTRONS_IN_BARREL
int TOTAL_ELECTRONS_IN_ENDCAP
int BARREL_ELECTRONS_BEFORE_BORDER_CUT
int SHOWER_ELECTRONS_IN_ENDCAP
int SILVER_ELECTRONS_IN_ENDCAP
int CRACK_ELECTRONS_IN_ENDCAP
int CRACK_ELECTRONS_IN_BARREL
int SHOWER_ELECTRONS_IN_BARREL
int TOTAL_ELECTRONS_IN_BARREL

◆ ringNumberCorrector()

int ZeeCalibration::ringNumberCorrector ( int  k)
private

Definition at line 1867 of file ZeeCalibration.cc.

References calibMode_, and dqmdumpme::k.

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

1867  {
1868  int index = -999;
1869 
1870  if (calibMode_ == "RING") {
1871  if (k >= 0 && k <= 84)
1872  index = k - 85;
1873 
1874  if (k >= 85 && k <= 169)
1875  index = k - 84;
1876 
1877  if (k >= 170 && k <= 208)
1878  index = -k + 84;
1879 
1880  if (k >= 209 && k <= 247)
1881  index = k - 123;
1882 
1883  }
1884 
1885  else if (calibMode_ == "MODULE") {
1886  if (k >= 0 && k <= 71)
1887  index = k - 72;
1888 
1889  if (k >= 72 && k <= 143)
1890  index = k - 71;
1891  }
1892  return index;
1893 }
std::string calibMode_

◆ startingNewLoop()

void ZeeCalibration::startingNewLoop ( unsigned int  iLoop)
overridevirtual

Called at beginning of loop.

Implements edm::EDLooperBase.

Definition at line 1280 of file ZeeCalibration.cc.

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

1280  {
1281  std::cout << "[ZeeCalibration] Starting loop number " << iLoop << std::endl;
1282 
1284 
1285  resetVariables();
1286 
1287  resetHistograms();
1288 
1289 #ifdef DEBUG
1290  std::cout << "[ZeeCalibration] exiting from startingNewLoop" << std::endl;
1291 #endif
1292 }
ZIterativeAlgorithmWithFit * theAlgorithm_

◆ xtalIsOnModuleBorder()

bool ZeeCalibration::xtalIsOnModuleBorder ( EBDetId  myEBDetId)
private

Definition at line 1955 of file ZeeCalibration.cc.

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

Referenced by duringLoop().

1955  {
1956  bool myBool(false);
1957 
1958  short ieta = myEBDetId.ieta();
1959  short iphi = myEBDetId.iphi();
1960 
1961  // std::cout<<"[xtalIsOnModuleBorder] ieta: "<<ieta<<" iphi "<<iphi<<std::endl;
1962 
1963  myBool = (abs(ieta) == 1 || abs(ieta) == 25 || abs(ieta) == 26 || abs(ieta) == 45 || abs(ieta) == 46 ||
1964  abs(ieta) == 65 || abs(ieta) == 66 || abs(ieta) == 85);
1965 
1966  for (int i = 0; i < 19; i++) {
1967  if (iphi == (20 * i + 1) || iphi == 20 * i)
1968  myBool = true;
1969  }
1970 
1971  return myBool;
1972 }
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

◆ aHLTNames

char ZeeCalibration::aHLTNames[6000]
private

Definition at line 366 of file ZeeCalibration.h.

◆ aHLTResults

bool ZeeCalibration::aHLTResults[200]
private

Definition at line 369 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ aNames

TString ZeeCalibration::aNames[200]
private

Definition at line 368 of file ZeeCalibration.h.

◆ aTriggerNames

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

Definition at line 362 of file ZeeCalibration.h.

◆ aTriggerResults

bool ZeeCalibration::aTriggerResults[200]
private

Definition at line 363 of file ZeeCalibration.h.

◆ BARREL_ELECTRONS_AFTER_BORDER_CUT

int ZeeCalibration::BARREL_ELECTRONS_AFTER_BORDER_CUT
private

Definition at line 331 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 330 of file ZeeCalibration.h.

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

◆ barrelfile_

std::string ZeeCalibration::barrelfile_
private

Definition at line 181 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ BBZN

Int_t ZeeCalibration::BBZN
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ BBZN_gg

Int_t ZeeCalibration::BBZN_gg
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ BBZN_t0

Int_t ZeeCalibration::BBZN_t0
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ BBZN_tt

Int_t ZeeCalibration::BBZN_tt
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ calibCoeff

float ZeeCalibration::calibCoeff[250]
private

Definition at line 195 of file ZeeCalibration.h.

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

◆ calibCoeffError

float ZeeCalibration::calibCoeffError[250]
private

Definition at line 197 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 328 of file ZeeCalibration.h.

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

◆ CRACK_ELECTRONS_IN_BARREL

int ZeeCalibration::CRACK_ELECTRONS_IN_BARREL
private

Definition at line 345 of file ZeeCalibration.h.

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

◆ CRACK_ELECTRONS_IN_ENDCAP

int ZeeCalibration::CRACK_ELECTRONS_IN_ENDCAP
private

Definition at line 346 of file ZeeCalibration.h.

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

◆ ebRecHitToken_

const edm::EDGetTokenT<EBRecHitCollection> ZeeCalibration::ebRecHitToken_
private

Definition at line 165 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ EBZN

Int_t ZeeCalibration::EBZN
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ EBZN_gg

Int_t ZeeCalibration::EBZN_gg
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ EBZN_t0

Int_t ZeeCalibration::EBZN_t0
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ EBZN_tt

Int_t ZeeCalibration::EBZN_tt
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ eeRecHitToken_

const edm::EDGetTokenT<EERecHitCollection> ZeeCalibration::eeRecHitToken_
private

Definition at line 166 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ EEZN

Int_t ZeeCalibration::EEZN
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ EEZN_gg

Int_t ZeeCalibration::EEZN_gg
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ EEZN_t0

Int_t ZeeCalibration::EEZN_t0
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ EEZN_tt

Int_t ZeeCalibration::EEZN_tt
private

Definition at line 314 of file ZeeCalibration.h.

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

◆ electronCollection_

const std::string ZeeCalibration::electronCollection_
private

Definition at line 159 of file ZeeCalibration.h.

◆ electronProducer_

const std::string ZeeCalibration::electronProducer_
private

Definition at line 158 of file ZeeCalibration.h.

◆ electronSelection_

unsigned int ZeeCalibration::electronSelection_
private

Definition at line 323 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ endcapfile_

std::string ZeeCalibration::endcapfile_
private

Definition at line 182 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ erechitCollection_

const std::string ZeeCalibration::erechitCollection_
private

Definition at line 151 of file ZeeCalibration.h.

◆ erechitProducer_

const std::string ZeeCalibration::erechitProducer_
private

Definition at line 150 of file ZeeCalibration.h.

◆ etaBins_

unsigned int ZeeCalibration::etaBins_
private

Definition at line 173 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etaMax_

double ZeeCalibration::etaMax_
private

Definition at line 178 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etaMin_

double ZeeCalibration::etaMin_
private

Definition at line 176 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etBins_

unsigned int ZeeCalibration::etBins_
private

Definition at line 174 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etMax_

double ZeeCalibration::etMax_
private

Definition at line 179 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ etMin_

double ZeeCalibration::etMin_
private

Definition at line 177 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ geometryToken_

const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> ZeeCalibration::geometryToken_
private

Definition at line 171 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ GOLDEN_ELECTRONS_IN_BARREL

int ZeeCalibration::GOLDEN_ELECTRONS_IN_BARREL
private

Definition at line 336 of file ZeeCalibration.h.

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

◆ GOLDEN_ELECTRONS_IN_ENDCAP

int ZeeCalibration::GOLDEN_ELECTRONS_IN_ENDCAP
private

Definition at line 337 of file ZeeCalibration.h.

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

◆ gsfElectronToken_

const edm::EDGetTokenT<reco::GsfElectronCollection> ZeeCalibration::gsfElectronToken_
private

Definition at line 169 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ h1_borderElectronClassification_

TH1F* ZeeCalibration::h1_borderElectronClassification_
private

Definition at line 312 of file ZeeCalibration.h.

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

◆ h1_eleClasses_

TH1F* ZeeCalibration::h1_eleClasses_
private

Definition at line 224 of file ZeeCalibration.h.

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

◆ h1_electronCosTheta_SC_

TH1F* ZeeCalibration::h1_electronCosTheta_SC_
private

Definition at line 309 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 310 of file ZeeCalibration.h.

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

◆ h1_electronCosTheta_TK_

TH1F* ZeeCalibration::h1_electronCosTheta_TK_
private

Definition at line 308 of file ZeeCalibration.h.

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

◆ h1_eleERecoOverEtrue_

TH1F* ZeeCalibration::h1_eleERecoOverEtrue_
private

Definition at line 246 of file ZeeCalibration.h.

◆ h1_eleEtaResol_

TH1F* ZeeCalibration::h1_eleEtaResol_
private

Definition at line 248 of file ZeeCalibration.h.

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

◆ h1_elePhiResol_

TH1F* ZeeCalibration::h1_elePhiResol_
private

Definition at line 249 of file ZeeCalibration.h.

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

◆ h1_eventsAfterBorderSelection_

TH1F* ZeeCalibration::h1_eventsAfterBorderSelection_
private

Definition at line 217 of file ZeeCalibration.h.

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

◆ h1_eventsAfterEWKSelection_

TH1F* ZeeCalibration::h1_eventsAfterEWKSelection_
private

Definition at line 214 of file ZeeCalibration.h.

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

◆ h1_eventsBeforeBorderSelection_

TH1F* ZeeCalibration::h1_eventsBeforeBorderSelection_
private

Definition at line 216 of file ZeeCalibration.h.

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

◆ h1_eventsBeforeEWKSelection_

TH1F* ZeeCalibration::h1_eventsBeforeEWKSelection_
private

Definition at line 213 of file ZeeCalibration.h.

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

◆ h1_mc_

TH1F* ZeeCalibration::h1_mc_
private

Definition at line 269 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_mcEB_

TH1F* ZeeCalibration::h1_mcEB_
private

Definition at line 278 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_mcEBParz_

TH1F* ZeeCalibration::h1_mcEBParz_[25]
private

Definition at line 279 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h1_mcEE_

TH1F* ZeeCalibration::h1_mcEE_
private

Definition at line 282 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_mcEEParz_

TH1F* ZeeCalibration::h1_mcEEParz_[25]
private

Definition at line 283 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h1_mcParz_

TH1F* ZeeCalibration::h1_mcParz_[25]
private

Definition at line 270 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h1_nEleReco_

TH1F* ZeeCalibration::h1_nEleReco_
private

Definition at line 223 of file ZeeCalibration.h.

Referenced by bookHistograms().

◆ h1_occupancy_

TH1F* ZeeCalibration::h1_occupancy_
private

Definition at line 304 of file ZeeCalibration.h.

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

◆ h1_occupancyBarrel_

TH1F* ZeeCalibration::h1_occupancyBarrel_
private

Definition at line 305 of file ZeeCalibration.h.

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

◆ h1_occupancyEndcap_

TH1F* ZeeCalibration::h1_occupancyEndcap_
private

Definition at line 306 of file ZeeCalibration.h.

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

◆ h1_occupancyVsEta_

TH1F* ZeeCalibration::h1_occupancyVsEta_
private

Definition at line 299 of file ZeeCalibration.h.

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

◆ h1_occupancyVsEtaCrack_

TH1F* ZeeCalibration::h1_occupancyVsEtaCrack_
private

Definition at line 302 of file ZeeCalibration.h.

◆ h1_occupancyVsEtaGold_

TH1F* ZeeCalibration::h1_occupancyVsEtaGold_
private

Definition at line 300 of file ZeeCalibration.h.

◆ h1_occupancyVsEtaShower_

TH1F* ZeeCalibration::h1_occupancyVsEtaShower_
private

Definition at line 303 of file ZeeCalibration.h.

◆ h1_occupancyVsEtaSilver_

TH1F* ZeeCalibration::h1_occupancyVsEtaSilver_
private

Definition at line 301 of file ZeeCalibration.h.

◆ h1_preshowerOverSC_

TH1F* ZeeCalibration::h1_preshowerOverSC_
private

Definition at line 231 of file ZeeCalibration.h.

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

◆ h1_reco_ZMass_

TH1F* ZeeCalibration::h1_reco_ZMass_
private

Definition at line 236 of file ZeeCalibration.h.

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

◆ h1_reco_ZMassBad_

TH1F* ZeeCalibration::h1_reco_ZMassBad_
private

Definition at line 242 of file ZeeCalibration.h.

◆ h1_reco_ZMassCorr_

TH1F* ZeeCalibration::h1_reco_ZMassCorr_
private

Definition at line 238 of file ZeeCalibration.h.

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

◆ h1_reco_ZMassCorrBB_

TH1F* ZeeCalibration::h1_reco_ZMassCorrBB_
private

Definition at line 239 of file ZeeCalibration.h.

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

◆ h1_reco_ZMassCorrEE_

TH1F* ZeeCalibration::h1_reco_ZMassCorrEE_
private

Definition at line 240 of file ZeeCalibration.h.

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

◆ h1_reco_ZMassGood_

TH1F* ZeeCalibration::h1_reco_ZMassGood_
private

Definition at line 241 of file ZeeCalibration.h.

◆ h1_RMin_

TH1F* ZeeCalibration::h1_RMin_
private

Definition at line 244 of file ZeeCalibration.h.

◆ h1_RMinZ_

TH1F* ZeeCalibration::h1_RMinZ_
private

Definition at line 245 of file ZeeCalibration.h.

◆ h1_seedOverSC_

TH1F* ZeeCalibration::h1_seedOverSC_
private

Definition at line 230 of file ZeeCalibration.h.

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

◆ h1_weightSumMeanBarrel_

TH1F* ZeeCalibration::h1_weightSumMeanBarrel_
private

Definition at line 296 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_weightSumMeanEndcap_

TH1F* ZeeCalibration::h1_weightSumMeanEndcap_
private

Definition at line 297 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_ZCandMult_

TH1F* ZeeCalibration::h1_ZCandMult_
private

Definition at line 243 of file ZeeCalibration.h.

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

◆ h1_zEtaResol_

TH1F* ZeeCalibration::h1_zEtaResol_
private

Definition at line 234 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h1_zMassResol_

TH1F* ZeeCalibration::h1_zMassResol_
private

Definition at line 233 of file ZeeCalibration.h.

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

◆ h1_zPhiResol_

TH1F* ZeeCalibration::h1_zPhiResol_
private

Definition at line 235 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_chi2_

TH2F* ZeeCalibration::h2_chi2_[25]
private

Definition at line 285 of file ZeeCalibration.h.

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

◆ h2_coeffVsEta_

TH2F* ZeeCalibration::h2_coeffVsEta_
private

Definition at line 260 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_coeffVsEtaGrouped_

TH2F* ZeeCalibration::h2_coeffVsEtaGrouped_
private

Definition at line 261 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_coeffVsLoop_

TH2F* ZeeCalibration::h2_coeffVsLoop_
private

Definition at line 265 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_fEtaBarrelBad_

TH2F* ZeeCalibration::h2_fEtaBarrelBad_
private

Definition at line 220 of file ZeeCalibration.h.

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

◆ h2_fEtaBarrelGood_

TH2F* ZeeCalibration::h2_fEtaBarrelGood_
private

Definition at line 219 of file ZeeCalibration.h.

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

◆ h2_fEtaEndcapBad_

TH2F* ZeeCalibration::h2_fEtaEndcapBad_
private

Definition at line 222 of file ZeeCalibration.h.

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

◆ h2_fEtaEndcapGood_

TH2F* ZeeCalibration::h2_fEtaEndcapGood_
private

Definition at line 221 of file ZeeCalibration.h.

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

◆ h2_iterations_

TH2F* ZeeCalibration::h2_iterations_[25]
private

Definition at line 286 of file ZeeCalibration.h.

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

◆ h2_miscalRecal_

TH2F* ZeeCalibration::h2_miscalRecal_
private

Definition at line 267 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_miscalRecalEB_

TH2F* ZeeCalibration::h2_miscalRecalEB_
private

Definition at line 276 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_miscalRecalEE_

TH2F* ZeeCalibration::h2_miscalRecalEE_
private

Definition at line 280 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfJob().

◆ h2_residualSigma_

TH2F* ZeeCalibration::h2_residualSigma_
private

Definition at line 275 of file ZeeCalibration.h.

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

◆ h2_xtalMiscalibCoeffBarrel_

TH2F* ZeeCalibration::h2_xtalMiscalibCoeffBarrel_
private

Definition at line 292 of file ZeeCalibration.h.

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

◆ h2_xtalMiscalibCoeffEndcapMinus_

TH2F* ZeeCalibration::h2_xtalMiscalibCoeffEndcapMinus_
private

Definition at line 293 of file ZeeCalibration.h.

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

◆ h2_xtalMiscalibCoeffEndcapPlus_

TH2F* ZeeCalibration::h2_xtalMiscalibCoeffEndcapPlus_
private

Definition at line 294 of file ZeeCalibration.h.

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

◆ h2_xtalRecalibCoeffBarrel_

TH2F* ZeeCalibration::h2_xtalRecalibCoeffBarrel_[25]
private

Definition at line 288 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h2_xtalRecalibCoeffEndcapMinus_

TH2F* ZeeCalibration::h2_xtalRecalibCoeffEndcapMinus_[25]
private

Definition at line 289 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h2_xtalRecalibCoeffEndcapPlus_

TH2F* ZeeCalibration::h2_xtalRecalibCoeffEndcapPlus_[25]
private

Definition at line 290 of file ZeeCalibration.h.

Referenced by bookHistograms(), and endOfLoop().

◆ h2_zMassDiffVsLoop_

TH2F* ZeeCalibration::h2_zMassDiffVsLoop_
private

Definition at line 263 of file ZeeCalibration.h.

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

◆ h2_zMassVsLoop_

TH2F* ZeeCalibration::h2_zMassVsLoop_
private

Definition at line 262 of file ZeeCalibration.h.

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

◆ h2_zWidthVsLoop_

TH2F* ZeeCalibration::h2_zWidthVsLoop_
private

Definition at line 264 of file ZeeCalibration.h.

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

◆ h_eleEffEta

TH1F* ZeeCalibration::h_eleEffEta[2]
private

Definition at line 226 of file ZeeCalibration.h.

◆ h_eleEffEta_

TH1F* ZeeCalibration::h_eleEffEta_[2]
private

Definition at line 251 of file ZeeCalibration.h.

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

◆ h_eleEffPhi

TH1F* ZeeCalibration::h_eleEffPhi[2]
private

Definition at line 227 of file ZeeCalibration.h.

◆ h_eleEffPhi_

TH1F* ZeeCalibration::h_eleEffPhi_[2]
private

Definition at line 252 of file ZeeCalibration.h.

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

◆ h_eleEffPt

TH1F* ZeeCalibration::h_eleEffPt[2]
private

Definition at line 228 of file ZeeCalibration.h.

◆ h_eleEffPt_

TH1F* ZeeCalibration::h_eleEffPt_[2]
private

Definition at line 253 of file ZeeCalibration.h.

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

◆ h_ESCcorrEtrue_

TH1F* ZeeCalibration::h_ESCcorrEtrue_[25]
private

Definition at line 257 of file ZeeCalibration.h.

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

◆ h_ESCcorrEtrueVsEta_

TH2F* ZeeCalibration::h_ESCcorrEtrueVsEta_[25]
private

Definition at line 258 of file ZeeCalibration.h.

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

◆ h_ESCEtrue_

TH1F* ZeeCalibration::h_ESCEtrue_[25]
private

Definition at line 254 of file ZeeCalibration.h.

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

◆ h_ESCEtrueVsEta_

TH2F* ZeeCalibration::h_ESCEtrueVsEta_[25]
private

Definition at line 255 of file ZeeCalibration.h.

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

◆ hepMCToken_

const edm::EDGetTokenT<edm::HepMCProduct> ZeeCalibration::hepMCToken_
private

Definition at line 164 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ hlAccept_

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

Definition at line 355 of file ZeeCalibration.h.

◆ hlErrors_

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

Definition at line 356 of file ZeeCalibration.h.

◆ hlNames_

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

Definition at line 358 of file ZeeCalibration.h.

◆ hltCount

Int_t ZeeCalibration::hltCount
private

Definition at line 365 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ hltNamesLen

Int_t ZeeCalibration::hltNamesLen
private

Definition at line 367 of file ZeeCalibration.h.

◆ hlTriggerResults_

const edm::InputTag ZeeCalibration::hlTriggerResults_
private

Definition at line 145 of file ZeeCalibration.h.

◆ hlWasRun_

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

Definition at line 354 of file ZeeCalibration.h.

◆ ical

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

Definition at line 200 of file ZeeCalibration.h.

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

◆ init_

bool ZeeCalibration::init_
private

Definition at line 359 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ initCalibCoeff

float ZeeCalibration::initCalibCoeff[250]
private

Definition at line 198 of file ZeeCalibration.h.

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

◆ isfirstcall_

bool ZeeCalibration::isfirstcall_
private

Definition at line 371 of file ZeeCalibration.h.

Referenced by beginOfJob(), and duringLoop().

◆ islandSCToken_

const edm::EDGetTokenT<reco::SuperClusterCollection> ZeeCalibration::islandSCToken_
private

Definition at line 168 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ loopArray

double ZeeCalibration::loopArray[50]
private

Definition at line 325 of file ZeeCalibration.h.

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

◆ loopFlag_

int ZeeCalibration::loopFlag_
private

Definition at line 193 of file ZeeCalibration.h.

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

◆ mass

double ZeeCalibration::mass
private

◆ mass4tree

float ZeeCalibration::mass4tree
private

Definition at line 188 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ massDiff4tree

float ZeeCalibration::massDiff4tree
private

Definition at line 189 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ maxInvMassCut_

double ZeeCalibration::maxInvMassCut_
private

Definition at line 185 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ mcProducer_

const std::string ZeeCalibration::mcProducer_
private

Definition at line 147 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ MCZBB

Int_t ZeeCalibration::MCZBB
private

Definition at line 315 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ MCZEB

Int_t ZeeCalibration::MCZEB
private

Definition at line 315 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ MCZEE

Int_t ZeeCalibration::MCZEE
private

Definition at line 315 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ minInvMassCut_

double ZeeCalibration::minInvMassCut_
private

Definition at line 184 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().

◆ myTree

TTree* ZeeCalibration::myTree
private

Definition at line 141 of file ZeeCalibration.h.

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

◆ myZeePlots_

ZeePlots* ZeeCalibration::myZeePlots_
private

Definition at line 204 of file ZeeCalibration.h.

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

◆ myZeeRescaleFactorPlots_

ZeeRescaleFactorPlots* ZeeCalibration::myZeeRescaleFactorPlots_
private

Definition at line 205 of file ZeeCalibration.h.

◆ nAccept_

unsigned int ZeeCalibration::nAccept_
private

Definition at line 351 of file ZeeCalibration.h.

◆ nErrors_

unsigned int ZeeCalibration::nErrors_
private

Definition at line 352 of file ZeeCalibration.h.

◆ nEvents_

unsigned int ZeeCalibration::nEvents_
private

Definition at line 348 of file ZeeCalibration.h.

◆ NEVT

Int_t ZeeCalibration::NEVT
private

Definition at line 315 of file ZeeCalibration.h.

Referenced by duringLoop(), and printStatistics().

◆ NewCalibCoeff

float ZeeCalibration::NewCalibCoeff[250]
private

Definition at line 196 of file ZeeCalibration.h.

Referenced by endOfLoop().

◆ nWasRun_

unsigned int ZeeCalibration::nWasRun_
private

Definition at line 350 of file ZeeCalibration.h.

◆ outputFile_

TFile* ZeeCalibration::outputFile_
private

Definition at line 317 of file ZeeCalibration.h.

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

◆ outputFileName_

std::string ZeeCalibration::outputFileName_
private

Definition at line 143 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ read_events

int ZeeCalibration::read_events
private

Definition at line 191 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ rechitCollection_

const std::string ZeeCalibration::rechitCollection_
private

Definition at line 149 of file ZeeCalibration.h.

◆ rechitProducer_

const std::string ZeeCalibration::rechitProducer_
private

Definition at line 148 of file ZeeCalibration.h.

◆ scCollection_

const std::string ZeeCalibration::scCollection_
private

Definition at line 153 of file ZeeCalibration.h.

◆ scIslandCollection_

const std::string ZeeCalibration::scIslandCollection_
private

Definition at line 156 of file ZeeCalibration.h.

◆ scIslandProducer_

const std::string ZeeCalibration::scIslandProducer_
private

Definition at line 155 of file ZeeCalibration.h.

◆ scProducer_

const std::string ZeeCalibration::scProducer_
private

Definition at line 152 of file ZeeCalibration.h.

◆ scToken_

const edm::EDGetTokenT<reco::SuperClusterCollection> ZeeCalibration::scToken_
private

Definition at line 167 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ SHOWER_ELECTRONS_IN_BARREL

int ZeeCalibration::SHOWER_ELECTRONS_IN_BARREL
private

Definition at line 342 of file ZeeCalibration.h.

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

◆ SHOWER_ELECTRONS_IN_ENDCAP

int ZeeCalibration::SHOWER_ELECTRONS_IN_ENDCAP
private

Definition at line 343 of file ZeeCalibration.h.

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

◆ sigmaArray

double ZeeCalibration::sigmaArray[50]
private

Definition at line 326 of file ZeeCalibration.h.

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

◆ sigmaErrorArray

double ZeeCalibration::sigmaErrorArray[50]
private

Definition at line 327 of file ZeeCalibration.h.

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

◆ SILVER_ELECTRONS_IN_BARREL

int ZeeCalibration::SILVER_ELECTRONS_IN_BARREL
private

Definition at line 339 of file ZeeCalibration.h.

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

◆ SILVER_ELECTRONS_IN_ENDCAP

int ZeeCalibration::SILVER_ELECTRONS_IN_ENDCAP
private

Definition at line 340 of file ZeeCalibration.h.

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

◆ theAlgorithm_

ZIterativeAlgorithmWithFit* ZeeCalibration::theAlgorithm_
private

Definition at line 202 of file ZeeCalibration.h.

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

◆ theMaxLoops

unsigned int ZeeCalibration::theMaxLoops
private

Definition at line 319 of file ZeeCalibration.h.

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

◆ theParameterSet

edm::ParameterSet ZeeCalibration::theParameterSet
private

Definition at line 209 of file ZeeCalibration.h.

Referenced by ZeeCalibration().

◆ TOTAL_ELECTRONS_IN_BARREL

int ZeeCalibration::TOTAL_ELECTRONS_IN_BARREL
private

Definition at line 333 of file ZeeCalibration.h.

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

◆ TOTAL_ELECTRONS_IN_ENDCAP

int ZeeCalibration::TOTAL_ELECTRONS_IN_ENDCAP
private

Definition at line 334 of file ZeeCalibration.h.

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

◆ triggerCount

Int_t ZeeCalibration::triggerCount
private

Definition at line 361 of file ZeeCalibration.h.

◆ trigResultsToken_

const edm::EDGetTokenT<edm::TriggerResults> ZeeCalibration::trigResultsToken_
private

Definition at line 163 of file ZeeCalibration.h.

Referenced by duringLoop().

◆ wantEtaCorrection_

bool ZeeCalibration::wantEtaCorrection_
private

Definition at line 321 of file ZeeCalibration.h.

Referenced by duringLoop(), and ZeeCalibration().