CMS 3D CMS Logo

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

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

Inheritance diagram for ElectronCalibrationUniv:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 ElectronCalibrationUniv (const edm::ParameterSet &)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 ~ElectronCalibrationUniv () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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

DetId findMaxHit (const std::vector< DetId > &v1, const EBRecHitCollection *EBhits, const EERecHitCollection *EEhits)
 
bool TestEEvalidDetId (int crystal_ix, int crystal_iy, int iz)
 

Private Attributes

const std::string calibAlgo_
 
int calibClusterSize
 
TH1F * calibinter
 
TH1F * calibinterEndCapMinus
 
TH1F * calibinterEndCapPlus
 
TH1F * calibinterNoCuts
 
TH1F * calibs
 
TH1F * calibsEndCapMinus
 
TH1F * calibsEndCapPlus
 
TH1F * calibsNoCuts
 
const int clusterSize_
 
const double cut1_
 
const double cut2_
 
const double cut3_
 
const double cutCalo1_
 
const double cutCalo2_
 
const double cutEPCalo1_
 
const double cutEPCalo2_
 
const double cutEPin1_
 
const double cutEPin2_
 
const double cutESeed_
 
TH1F * e25
 
TH1F * e25NoCuts
 
TH1F * E25oP
 
TH1F * E25oPNoCuts
 
TH2F * E25oPvsEta
 
TH2F * E25oPvsEtaEndCapMinus
 
TH2F * E25oPvsEtaEndCapPlus
 
TH1F * e25OverScE
 
TH1F * e25OverScENoCuts
 
TH1F * e9
 
TH1F * e9NoCuts
 
TH1F * e9Overe25
 
TH1F * e9Overe25NoCuts
 
const edm::InputTag ebRecHitLabel_
 
const edm::EDGetTokenT< EBRecHitCollectionebRecHitToken_
 
const edm::InputTag eeRecHitLabel_
 
const edm::EDGetTokenT< EERecHitCollectioneeRecHitToken_
 
const int elecclass_
 
const edm::InputTag electronLabel_
 
const double elePt_
 
std::vector< float > EnergyVector
 
std::vector< float > EnergyVectorNoCuts
 
TH1F * EoP
 
TH1F * EoP_all
 
TH1F * EoPNoCuts
 
TH1F * Error1
 
TH1F * Error1NoCuts
 
TH1F * Error2
 
TH1F * Error2NoCuts
 
TH1F * Error3
 
TH1F * Error3NoCuts
 
TH1F * eSeedOverPout
 
TH1F * eSeedOverPout2
 
TH1F * eSeedOverPout2ESeed
 
TH1F * eSeedOverPout2NoCuts
 
TH1F * eSeedOverPoutNoCuts
 
int etaMax
 
int etaMin
 
std::vector< std::vector< float > > EventMatrix
 
std::vector< std::vector< float > > EventMatrixNoCuts
 
TH1F * EventsAfterCuts
 
TFile * f
 
TH2F * GeneralMap
 
TH2F * GeneralMapBeforePt
 
TH2F * GeneralMapEndCapMinus
 
TH2F * GeneralMapEndCapMinusBeforePt
 
TH2F * GeneralMapEndCapPlus
 
TH2F * GeneralMapEndCapPlusBeforePt
 
const edm::EDGetTokenT< reco::GsfElectronCollectiongsfElectronToken_
 
TH1F * hadOverEm
 
TH1F * hadOverEmESeed
 
TH1F * hadOverEmNoCuts
 
int keventweight
 
const int keventweight_
 
TH2F * Map
 
TH2F * Map3Dcalib
 
TH2F * Map3DcalibEndCapMinus
 
TH2F * Map3DcalibEndCapPlus
 
TH2F * Map3DcalibNoCuts
 
TH2F * MapCor1
 
TH2F * MapCor10
 
TH2F * MapCor10ESeed
 
TH2F * MapCor10NoCuts
 
TH2F * MapCor11
 
TH2F * MapCor11ESeed
 
TH2F * MapCor11NoCuts
 
TH2F * MapCor1ESeed
 
TH2F * MapCor1NoCuts
 
TH2F * MapCor2
 
TH2F * MapCor2ESeed
 
TH2F * MapCor2NoCuts
 
TH2F * MapCor3
 
TH2F * MapCor3ESeed
 
TH2F * MapCor3NoCuts
 
TH2F * MapCor4
 
TH2F * MapCor4ESeed
 
TH2F * MapCor4NoCuts
 
TH2F * MapCor5
 
TH2F * MapCor5ESeed
 
TH2F * MapCor5NoCuts
 
TH2F * MapCor6
 
TH2F * MapCor6ESeed
 
TH2F * MapCor6NoCuts
 
TH2F * MapCor7
 
TH2F * MapCor7ESeed
 
TH2F * MapCor7NoCuts
 
TH2F * MapCor8
 
TH2F * MapCor8ESeed
 
TH2F * MapCor8NoCuts
 
TH2F * MapCor9
 
TH2F * MapCor9ESeed
 
TH2F * MapCor9NoCuts
 
TH2F * MapEndCapMinus
 
TH2F * MapEndCapPlus
 
std::vector< int > MaxCCeta
 
std::vector< int > MaxCCetaNoCuts
 
std::vector< int > MaxCCphi
 
std::vector< int > MaxCCphiNoCuts
 
const int maxeta_
 
const int maxphi_
 
const int mineta_
 
const int minphi_
 
const std::string miscalibfile_
 
const std::string miscalibfileEndCap_
 
HouseholderDecompositionMyHH
 
MinL3AlgorithmMyL3Algo1
 
const int numevent_
 
int phiMax
 
int phiMin
 
TH1F * PinMinPout
 
TH1F * PinMinPoutNoCuts
 
TH1F * PinOverPout
 
TH1F * PinOverPoutNoCuts
 
int read_events
 
const std::string rootfile_
 
TH1F * scE
 
TH1F * scENoCuts
 
std::vector< float > solution
 
std::vector< float > solutionNoCuts
 
const CaloTopologytheCaloTopology_
 
const edm::ESGetToken< CaloTopology, CaloTopologyRecordtopologyToken_
 
TH1F * trP
 
TH1F * trPNoCuts
 
std::vector< std::vector< DetId > > UnivEventIds
 
MinL3AlgoUniv< DetId > * UnivL3
 
std::map< DetId, float > Univsolution
 
std::vector< float > WeightVector
 
std::vector< float > WeightVectorNoCuts
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 58 of file ElectronCalibrationUniv.h.

Constructor & Destructor Documentation

◆ ElectronCalibrationUniv()

ElectronCalibrationUniv::ElectronCalibrationUniv ( const edm::ParameterSet iConfig)
explicit

Definition at line 20 of file ElectronCalibrationUniv.cc.

21  : ebRecHitLabel_(iConfig.getParameter<edm::InputTag>("ebRecHitsLabel")),
22  eeRecHitLabel_(iConfig.getParameter<edm::InputTag>("eeRecHitsLabel")),
23  electronLabel_(iConfig.getParameter<edm::InputTag>("electronLabel")),
24  rootfile_(iConfig.getParameter<std::string>("rootfile")),
25  calibAlgo_(iConfig.getParameter<std::string>("CALIBRATION_ALGO")),
26  miscalibfile_(iConfig.getParameter<std::string>("miscalibfile")),
27  miscalibfileEndCap_(iConfig.getParameter<std::string>("miscalibfileEndCap")),
28  keventweight_(iConfig.getParameter<int>("keventweight")),
29  elePt_(iConfig.getParameter<double>("ElePt")),
30  maxeta_(iConfig.getParameter<int>("maxeta")),
31  mineta_(iConfig.getParameter<int>("mineta")),
32  maxphi_(iConfig.getParameter<int>("maxphi")),
33  minphi_(iConfig.getParameter<int>("minphi")),
34  cut1_(iConfig.getParameter<double>("cut1")),
35  cut2_(iConfig.getParameter<double>("cut2")),
36  cut3_(iConfig.getParameter<double>("cut3")),
37  numevent_(iConfig.getParameter<int>("numevent")),
38  cutEPCalo1_(iConfig.getParameter<double>("cutEPCaloMin")),
39  cutEPCalo2_(iConfig.getParameter<double>("cutEPCaloMax")),
40  cutEPin1_(iConfig.getParameter<double>("cutEPinMin")),
41  cutEPin2_(iConfig.getParameter<double>("cutEPinMax")),
42  cutCalo1_(iConfig.getParameter<double>("cutCaloMin")),
43  cutCalo2_(iConfig.getParameter<double>("cutCaloMax")),
44  cutESeed_(iConfig.getParameter<double>("cutESeed")),
45  clusterSize_(iConfig.getParameter<int>("Clustersize")),
46  elecclass_(iConfig.getParameter<int>("elecclass")),
47  ebRecHitToken_(consumes<EBRecHitCollection>(ebRecHitLabel_)),
48  eeRecHitToken_(consumes<EERecHitCollection>(eeRecHitLabel_)),
49  gsfElectronToken_(consumes<reco::GsfElectronCollection>(electronLabel_)),
50  topologyToken_(esConsumes<edm::Transition::BeginRun>()) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
const edm::InputTag electronLabel_
const edm::InputTag ebRecHitLabel_
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
const std::string miscalibfileEndCap_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronToken_
const edm::InputTag eeRecHitLabel_
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_

◆ ~ElectronCalibrationUniv()

ElectronCalibrationUniv::~ElectronCalibrationUniv ( )
override

Definition at line 52 of file ElectronCalibrationUniv.cc.

52 {}

Member Function Documentation

◆ analyze()

void ElectronCalibrationUniv::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

START HERE....

Implements edm::one::EDAnalyzerBase.

Definition at line 609 of file ElectronCalibrationUniv.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, reco::GsfElectron::classification(), PixelTestBeamValidation_cfi::ClusterSize, clusterSize_, gather_cfg::cout, cut1_, cut2_, cut3_, cutEPin1_, cutEPin2_, e25, e25NoCuts, E25oP, E25oPNoCuts, E25oPvsEta, E25oPvsEtaEndCapMinus, E25oPvsEtaEndCapPlus, e25OverScE, e25OverScENoCuts, e9, e9NoCuts, e9Overe25, e9Overe25NoCuts, ebRecHitToken_, DetId::Ecal, EcalBarrel, reco::GsfElectron::ecalDrivenSeed(), eeRecHitToken_, elecclass_, pdwgLeptonRecoSkim_cfi::electronCollection, elePt_, edm::SortedCollection< T, SORT >::empty(), edm::SortedCollection< T, SORT >::end(), HCALHighEnergyHPDFilter_cfi::energy, reco::CaloCluster::energy(), EnergyVector, EoP, EoPNoCuts, Error1, Error1NoCuts, Error2, Error2NoCuts, Error3, Error3NoCuts, reco::GsfElectron::eSeedClusterOverPout(), eSeedOverPout, eSeedOverPout2, eSeedOverPout2NoCuts, eSeedOverPoutNoCuts, reco::GsfElectron::eSuperClusterOverP(), EventMatrix, EventsAfterCuts, edm::SortedCollection< T, SORT >::find(), findMaxHit(), newFWLiteAna::found, GeneralMap, GeneralMapBeforePt, GeneralMapEndCapMinus, GeneralMapEndCapMinusBeforePt, GeneralMapEndCapPlus, GeneralMapEndCapPlusBeforePt, CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), gsfElectronToken_, hadOverEm, hadOverEmNoCuts, reco::GsfElectron::hadronicOverEm(), reco::CaloCluster::hitsAndFractions(), iEvent, edm::isNotFinite(), edm::HandleBase::isValid(), Map, MapCor1, MapCor10, MapCor10NoCuts, MapCor11, MapCor11NoCuts, MapCor1NoCuts, MapCor2, MapCor2NoCuts, MapCor3, MapCor3NoCuts, MapCor4, MapCor4NoCuts, MapCor5, MapCor5NoCuts, MapCor6, MapCor6NoCuts, MapCor7, MapCor7NoCuts, MapCor8, MapCor8NoCuts, MapCor9, MapCor9NoCuts, MapEndCapMinus, MapEndCapPlus, DetId::null(), reco::LeafCandidate::p(), PinMinPout, PinMinPoutNoCuts, PinOverPout, PinOverPoutNoCuts, funct::pow(), edm::Handle< T >::product(), JetPartonCorrections_cff::Radius, read_events, scE, scENoCuts, mathSSE::sqrt(), DetId::subdetId(), reco::GsfElectron::superCluster(), theCaloTopology_, reco::GsfElectron::trackMomentumAtCalo(), reco::GsfElectron::trackMomentumAtVtx(), reco::GsfElectron::trackMomentumError(), reco::GsfElectron::trackMomentumOut(), trP, trPNoCuts, groupFilesInBlocks::tt, UnivEventIds, and trackerHitRTTI::vector.

609  {
610  //=================================================================================
611  using namespace edm;
612 
613  // Get EBRecHits
615  iEvent.getByToken(ebRecHitToken_, EBphits);
616  if (!EBphits.isValid()) {
617  std::cerr << "Error! can't get the product EBRecHitCollection: " << std::endl;
618  }
619  const EBRecHitCollection* EBhits = EBphits.product(); // get a ptr to the product
620 
621  // Get EERecHits
623 
624  iEvent.getByToken(eeRecHitToken_, EEphits);
625  if (!EEphits.isValid()) {
626  std::cerr << "Error! can't get the product EERecHitCollection: " << std::endl;
627  }
628  const EERecHitCollection* EEhits = EEphits.product(); // get a ptr to the product
629 
630  // Get pixelElectrons
632  iEvent.getByToken(gsfElectronToken_, pElectrons);
633  if (!pElectrons.isValid()) {
634  std::cerr << "Error! can't get the product ElectronCollection: " << std::endl;
635  }
637  read_events++;
638  if (read_events % 1000 == 0)
639  std::cout << "read_events = " << read_events << std::endl;
640 
641  EventsAfterCuts->Fill(1);
642  if (!EBhits || !EEhits)
643  return;
644  EventsAfterCuts->Fill(2);
645  if (EBhits->empty() && EEhits->empty())
646  return;
647  EventsAfterCuts->Fill(3);
648  if (!electronCollection)
649  return;
650  EventsAfterCuts->Fill(4);
651  if (electronCollection->empty())
652  return;
653 
654  // ////////////////Need to recalibrate the events (copy code from EcalRecHitRecalib):
655 
659 
660  reco::GsfElectronCollection::const_iterator eleIt = electronCollection->begin();
661 
662  reco::GsfElectron highPtElectron;
663 
664  float highestElePt = 0.;
665  bool found = false;
666  for (eleIt = electronCollection->begin(); eleIt != electronCollection->end(); eleIt++) {
667  if (fabs(eleIt->eta()) > 2.4)
668  continue;
669  // if(eleIt->eta()<0.0) continue;
670 
671  if (eleIt->pt() > highestElePt) {
672  highestElePt = eleIt->pt();
673  highPtElectron = *eleIt;
674  found = true;
675  // std::cout<<" eleIt->pt( "<<eleIt->pt()<<" eleIt->eta() "<<eleIt->eta()<<std::endl;
676  }
677  }
678  EventsAfterCuts->Fill(5);
679  if (!found)
680  return;
681 
682  const reco::SuperCluster& sc = *(highPtElectron.superCluster());
683  // if(fabs(sc.eta())>1.479){std::cout<<" SC not in Barrel "<<sc.eta()<<std::endl;;}
684  // const std::vector<DetId> & v1 = sc.getHitsByDetId();
685 
686  std::vector<DetId> v1;
687  //Loop to fill the vector of DetIds
688  for (std::vector<std::pair<DetId, float> >::const_iterator idsIt = sc.hitsAndFractions().begin();
689  idsIt != sc.hitsAndFractions().end();
690  ++idsIt) {
691  v1.push_back(idsIt->first);
692  }
693 
694  DetId maxHitId;
695 
696  maxHitId = findMaxHit(v1, (EBhits), (EEhits));
697  //maxHitId = findMaxHit(v1,EBhits,EEhits);
698 
699  EventsAfterCuts->Fill(6);
700  if (maxHitId.null()) {
701  std::cout << " Null " << std::endl;
702  return;
703  }
704 
705  int maxCC_Eta = 0;
706  int maxCC_Phi = 0;
707  int Zside = 0;
708  if (maxHitId.subdetId() != 1) {
709  maxCC_Eta = ((EEDetId)maxHitId).ix();
710  maxCC_Phi = ((EEDetId)maxHitId).iy();
711  Zside = ((EEDetId)maxHitId).zside();
712  // std::cout<<" ++++++++ Zside "<<Zside<<std::endl;
713  } else {
714  maxCC_Eta = ((EBDetId)maxHitId).ieta();
715  maxCC_Phi = ((EBDetId)maxHitId).iphi();
716  }
717 
718  // if(maxCC_Eta>maxeta_ ) ;
719  // if(maxCC_Eta<mineta_ ) ;
720 
721  // number of events per crystal is set
722  // eventcrystal[maxCC_Eta][maxCC_Phi]+=1;
723  // if(eventcrystal[maxCC_Eta][maxCC_Phi] > numevent_) ;
724 
725  // fill cluster energy
726  std::vector<float> energy;
727  float energy3x3 = 0.;
728  float energy5x5 = 0.;
729  //Should be moved to cfg file!
731 
733  std::vector<DetId> NxNaroundMax = topology->getWindow(maxHitId, ClusterSize, ClusterSize);
734  //ToCompute 3x3
735  std::vector<DetId> S9aroundMax = topology->getWindow(maxHitId, 3, 3);
736 
737  EventsAfterCuts->Fill(7);
738  if ((int)NxNaroundMax.size() != ClusterSize * ClusterSize)
739  return;
740  EventsAfterCuts->Fill(8);
741  if (S9aroundMax.size() != 9)
742  return;
743 
744  // std::cout<<" ******** New Event "<<std::endl;
745 
746  EventsAfterCuts->Fill(9);
747  for (int icry = 0; icry < ClusterSize * ClusterSize; icry++) {
748  if (NxNaroundMax[icry].subdetId() == EcalBarrel) {
750  itrechit = EBhits->find(NxNaroundMax[icry]);
751  if (itrechit == EBhits->end()) {
752  // std::cout << "EB DetId not in e25" << std::endl;
753  energy.push_back(0.);
754  energy5x5 += 0.;
755  continue;
756  }
757 
758  if (edm::isNotFinite(itrechit->energy())) {
759  std::cout << " nan energy " << std::endl;
760  return;
761  }
762  energy.push_back(itrechit->energy());
763  energy5x5 += itrechit->energy();
764 
765  //Summing in 3x3 to cut later on:
766  for (int tt = 0; tt < 9; tt++) {
767  if (NxNaroundMax[icry] == S9aroundMax[tt])
768  energy3x3 += itrechit->energy();
769  }
770  } else {
772 
773  itrechit = EEhits->find(NxNaroundMax[icry]);
774 
775  if (itrechit == EEhits->end()) {
776  // std::cout << "EE DetId not in e25" << std::endl;
777  // std::cout<<" ******** putting 0 "<<std::endl;
778  energy.push_back(0.);
779  energy5x5 += 0.;
780  continue;
781  }
782 
783  if (edm::isNotFinite(itrechit->energy())) {
784  std::cout << " nan energy " << std::endl;
785  return;
786  }
787  energy.push_back(itrechit->energy());
788  energy5x5 += itrechit->energy();
789 
790  //Summing in 3x3 to cut later on:
791  for (int tt = 0; tt < 9; tt++) {
792  if (NxNaroundMax[icry] == S9aroundMax[tt])
793  energy3x3 += itrechit->energy();
794  }
795  }
796  }
797  // if((read_events-50)%10000 ==0)cout << "++++++++++++ENERGY 5x5 " << energy5x5 << std::endl;
798  EventsAfterCuts->Fill(10);
799  // std::cout<<" ******** NxNaroundMax.size() "<<NxNaroundMax.size()<<std::endl;
800  // std::cout<<" ******** energy.size() "<<energy.size()<<std::endl;
801  if ((int)energy.size() != ClusterSize * ClusterSize)
802  return;
803 
804  if (maxHitId.subdetId() == EcalBarrel) {
805  GeneralMapBeforePt->Fill(maxCC_Eta, maxCC_Phi);
806  } else {
807  if (Zside < 0) {
808  GeneralMapEndCapMinusBeforePt->Fill(maxCC_Eta, maxCC_Phi);
809  } else {
810  GeneralMapEndCapPlusBeforePt->Fill(maxCC_Eta, maxCC_Phi);
811  }
812  }
813 
814  EventsAfterCuts->Fill(11);
815  if (highestElePt < elePt_)
816  return;
817 
818  if (maxHitId.subdetId() == EcalBarrel) {
819  GeneralMap->Fill(maxCC_Eta, maxCC_Phi);
820  } else {
821  if (Zside < 0) {
822  GeneralMapEndCapMinus->Fill(maxCC_Eta, maxCC_Phi);
823  } else {
824  GeneralMapEndCapPlus->Fill(maxCC_Eta, maxCC_Phi);
825  }
826  }
827 
828  EventsAfterCuts->Fill(12);
829  if (highPtElectron.classification() != elecclass_ && elecclass_ != -1)
830  return;
831 
832  float Ptrack_in =
833  sqrt(pow(highPtElectron.trackMomentumAtVtx().X(), 2) + pow(highPtElectron.trackMomentumAtVtx().Y(), 2) +
834  pow(highPtElectron.trackMomentumAtVtx().Z(), 2));
835 
836  float UncorrectedPatCalo =
837  sqrt(pow(highPtElectron.trackMomentumAtCalo().X(), 2) + pow(highPtElectron.trackMomentumAtCalo().Y(), 2) +
838  pow(highPtElectron.trackMomentumAtCalo().Z(), 2));
839 
840  float Ptrack_out =
841  sqrt(pow(highPtElectron.trackMomentumOut().X(), 2) + pow(highPtElectron.trackMomentumOut().Y(), 2) +
842  pow(highPtElectron.trackMomentumOut().Z(), 2));
843 
844  e9NoCuts->Fill(energy3x3);
845  e25NoCuts->Fill(energy5x5);
846  e9Overe25NoCuts->Fill(energy3x3 / energy5x5);
847  scENoCuts->Fill(sc.energy());
848 
849  trPNoCuts->Fill(UncorrectedPatCalo);
850 
851  EoPNoCuts->Fill(highPtElectron.eSuperClusterOverP());
852  e25OverScENoCuts->Fill(energy5x5 / sc.energy());
853 
854  E25oPNoCuts->Fill(energy5x5 / UncorrectedPatCalo);
855 
856  PinOverPoutNoCuts->Fill(
857  sqrt(pow(highPtElectron.trackMomentumAtVtx().X(), 2) + pow(highPtElectron.trackMomentumAtVtx().Y(), 2) +
858  pow(highPtElectron.trackMomentumAtVtx().Z(), 2)) /
859  sqrt(pow(highPtElectron.trackMomentumOut().X(), 2) + pow(highPtElectron.trackMomentumOut().Y(), 2) +
860  pow(highPtElectron.trackMomentumOut().Z(), 2)));
861  eSeedOverPoutNoCuts->Fill(highPtElectron.eSuperClusterOverP());
862 
863  MapCor1NoCuts->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / Ptrack_in);
864  MapCor2NoCuts->Fill(energy5x5 / UncorrectedPatCalo, highPtElectron.eSuperClusterOverP());
865  MapCor3NoCuts->Fill(energy5x5 / UncorrectedPatCalo, Ptrack_out / Ptrack_in);
866  MapCor4NoCuts->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / highPtElectron.p());
867  MapCor5NoCuts->Fill(energy5x5 / UncorrectedPatCalo, UncorrectedPatCalo / Ptrack_out);
868  MapCor6NoCuts->Fill(Ptrack_out / Ptrack_in, energy5x5 / Ptrack_in);
869  MapCor7NoCuts->Fill(Ptrack_out / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
870  MapCor8NoCuts->Fill(energy5x5 / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
871  MapCor9NoCuts->Fill(energy5x5 / UncorrectedPatCalo, highPtElectron.eSeedClusterOverPout());
872  MapCor10NoCuts->Fill(highPtElectron.eSeedClusterOverPout(), Ptrack_out / Ptrack_in);
873  MapCor11NoCuts->Fill(highPtElectron.eSeedClusterOverPout(), energy5x5 / Ptrack_in);
874 
875  PinMinPoutNoCuts->Fill((Ptrack_in - Ptrack_out) / Ptrack_in);
876 
877  Error1NoCuts->Fill(highPtElectron.trackMomentumError() / Ptrack_in);
878  Error2NoCuts->Fill(highPtElectron.trackMomentumError() / Ptrack_out);
879  Error3NoCuts->Fill(highPtElectron.trackMomentumError() / UncorrectedPatCalo);
880  eSeedOverPout2NoCuts->Fill(highPtElectron.eSeedClusterOverPout());
881 
882  hadOverEmNoCuts->Fill(highPtElectron.hadronicOverEm());
883 
884  //Cuts!
885  if ((energy3x3 / energy5x5) < cut1_)
886  return;
887  if ((Ptrack_out / Ptrack_in) < cut2_ || (Ptrack_out / Ptrack_in) > cut3_)
888  return;
889  if ((energy5x5 / Ptrack_in) < cutEPin1_ || (energy5x5 / Ptrack_in) > cutEPin2_)
890  return;
891  // if(!highPtElectron.ecalDriven())return;
892  // if(!highPtElectron.passingCutBasedPreselection())return;
893 
894  // // Apply Pietro cuts:
895  // EventsAfterCuts->Fill(13);
896  // //Module 1
897  // if(maxHitId.subdetId() == EcalBarrel){
898  // //Module 1
899  // if(maxCC_Eta <= 25){
900  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
901  // if(highPtElectron.eSeedClusterOverPout()>1.4 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
902  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.2)return ;
903  // }else{
904  // //Module 2
905  // if( maxCC_Eta > 25&& maxCC_Eta <= 45){
906  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
907  // if(highPtElectron.eSeedClusterOverPout()>1.25 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
908  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.2)return ;
909  // }else{
910  // //Module 3
911  // if( maxCC_Eta > 45&& maxCC_Eta <= 65){
912  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
913  // if(highPtElectron.eSeedClusterOverPout()>1.15 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
914  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.15)return ;
915  // }else{
916  // if( maxCC_Eta > 65&& maxCC_Eta <= 85){
917  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
918  // if(highPtElectron.eSeedClusterOverPout()>1.15 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
919  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.15)return ;
920  // }else{
921  // return;
922  // }
923  // }
924  // }
925  // }
926  // }else{
927  // //EndCapMinus Side:
928  // //EndCapPlus Side:
929  // int iR = sqrt((maxCC_Eta-50)*(maxCC_Eta-50) + (maxCC_Phi-50)*(maxCC_Phi-50));
930  // if( iR >= 22&& iR < 27){
931  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
932  // if(highPtElectron.eSeedClusterOverPout()>1.15 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
933  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.2)return ;
934  // }else{
935  // if( iR >= 27&& iR < 32){
936  // if(highPtElectron.eSuperClusterOverP()>1.1 || highPtElectron.eSuperClusterOverP()<0.95)return ;
937  // if(highPtElectron.eSeedClusterOverPout()>1.25 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
938  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.2)return ;
939  // }else{
940  // if( iR >= 32&& iR < 37){
941  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
942  // if(highPtElectron.eSeedClusterOverPout()>1.15 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
943  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.2)return ;
944  // }else{
945  // if( iR >= 37&& iR < 42){
946  // if(highPtElectron.eSuperClusterOverP()>1.1 || highPtElectron.eSuperClusterOverP()<0.95)return ;
947  // if(highPtElectron.eSeedClusterOverPout()>1.15 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
948  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.15)return ;
949  // }else{
950  // if( iR >= 42){
951  // if(highPtElectron.eSuperClusterOverP()>1.05 || highPtElectron.eSuperClusterOverP()<0.95)return ;
952  // if(highPtElectron.eSeedClusterOverPout()>1.15 || highPtElectron.eSeedClusterOverPout()<0.90)return ;
953  // if((Ptrack_in- Ptrack_out) / Ptrack_in <-0.05 || (Ptrack_in- Ptrack_out) / Ptrack_in >0.15)return ;
954  // }
955  // }
956  // }
957  // }
958  // }
959  // }
960 
961  if (maxHitId.subdetId() == EcalBarrel) {
962  E25oPvsEta->Fill(maxCC_Eta, energy5x5 / UncorrectedPatCalo);
963  } else {
964  float Radius = sqrt((maxCC_Eta) * (maxCC_Eta) + (maxCC_Phi) * (maxCC_Phi));
965  if (Zside < 0) {
966  E25oPvsEtaEndCapMinus->Fill(Radius, energy5x5 / UncorrectedPatCalo);
967  } else {
968  E25oPvsEtaEndCapPlus->Fill(Radius, energy5x5 / UncorrectedPatCalo);
969  }
970  }
971  e9->Fill(energy3x3);
972  e25->Fill(energy5x5);
973  e9Overe25->Fill(energy3x3 / energy5x5);
974  scE->Fill(sc.energy());
975  trP->Fill(UncorrectedPatCalo);
976 
977  EoP->Fill(highPtElectron.eSuperClusterOverP());
978  e25OverScE->Fill(energy5x5 / sc.energy());
979 
980  E25oP->Fill(energy5x5 / UncorrectedPatCalo);
981 
982  if (maxHitId.subdetId() == EcalBarrel) {
983  Map->Fill(maxCC_Eta, maxCC_Phi);
984  } else {
985  if (Zside < 0) {
986  MapEndCapMinus->Fill(maxCC_Eta, maxCC_Phi);
987  } else {
988  MapEndCapPlus->Fill(maxCC_Eta, maxCC_Phi);
989  }
990  }
991 
992  PinOverPout->Fill(sqrt(pow(highPtElectron.trackMomentumAtVtx().X(), 2) +
993  pow(highPtElectron.trackMomentumAtVtx().Y(), 2) +
994  pow(highPtElectron.trackMomentumAtVtx().Z(), 2)) /
995  sqrt(pow(highPtElectron.trackMomentumOut().X(), 2) + pow(highPtElectron.trackMomentumOut().Y(), 2) +
996  pow(highPtElectron.trackMomentumOut().Z(), 2)));
997  eSeedOverPout->Fill(highPtElectron.eSuperClusterOverP());
998 
999  MapCor1->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / Ptrack_in);
1000  MapCor2->Fill(energy5x5 / UncorrectedPatCalo, highPtElectron.eSuperClusterOverP());
1001  MapCor3->Fill(energy5x5 / UncorrectedPatCalo, Ptrack_out / Ptrack_in);
1002  MapCor4->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / highPtElectron.p());
1003  MapCor5->Fill(energy5x5 / UncorrectedPatCalo, UncorrectedPatCalo / Ptrack_out);
1004  MapCor6->Fill(Ptrack_out / Ptrack_in, energy5x5 / Ptrack_in);
1005  MapCor7->Fill(Ptrack_out / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
1006  MapCor8->Fill(energy5x5 / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
1007  MapCor9->Fill(energy5x5 / UncorrectedPatCalo, highPtElectron.eSeedClusterOverPout());
1008  MapCor10->Fill(highPtElectron.eSeedClusterOverPout(), Ptrack_out / Ptrack_in);
1009  MapCor11->Fill(highPtElectron.eSeedClusterOverPout(), energy5x5 / Ptrack_in);
1010 
1011  PinMinPout->Fill((Ptrack_in - Ptrack_out) / Ptrack_in);
1012 
1013  Error1->Fill(highPtElectron.trackMomentumError() / Ptrack_in);
1014  Error2->Fill(highPtElectron.trackMomentumError() / Ptrack_out);
1015  Error3->Fill(highPtElectron.trackMomentumError() / UncorrectedPatCalo);
1016 
1017  eSeedOverPout2->Fill(highPtElectron.eSeedClusterOverPout());
1018  hadOverEm->Fill(highPtElectron.hadronicOverEm());
1019 
1020  UnivEventIds.push_back(NxNaroundMax);
1021  EventMatrix.push_back(energy);
1022  EnergyVector.push_back(UncorrectedPatCalo);
1023 
1024  EventsAfterCuts->Fill(14);
1025 
1026  if (!highPtElectron.ecalDrivenSeed())
1027  EventsAfterCuts->Fill(15);
1028 
1029  return;
1030 }
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
bool ecalDrivenSeed() const
Definition: GsfElectron.h:158
std::vector< std::vector< float > > EventMatrix
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
float trackMomentumError() const
Definition: GsfElectron.h:884
T const * product() const
Definition: Handle.h:70
std::vector< EcalRecHit >::const_iterator const_iterator
const CaloTopology * theCaloTopology_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< std::vector< DetId > > UnivEventIds
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
Classification classification() const
Definition: GsfElectron.h:805
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
math::XYZVectorF trackMomentumAtCalo() const
Definition: GsfElectron.h:269
float eSeedClusterOverPout() const
Definition: GsfElectron.h:223
constexpr bool null() const
is this a null id ?
Definition: DetId.h:59
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:270
int iEvent
Definition: GenABIO.cc:224
double p() const final
magnitude of momentum vector
T sqrt(T t)
Definition: SSEVec.h:19
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:268
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
const_iterator end() const
double energy() const
cluster energy
Definition: CaloCluster.h:149
Definition: DetId.h:17
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronToken_
bool isValid() const
Definition: HandleBase.h:70
iterator find(key_type k)
HLT enums.
std::vector< float > EnergyVector
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
float hadronicOverEm() const
Definition: GsfElectron.h:500
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_
DetId findMaxHit(const std::vector< DetId > &v1, const EBRecHitCollection *EBhits, const EERecHitCollection *EEhits)

◆ beginJob()

void ElectronCalibrationUniv::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 55 of file ElectronCalibrationUniv.cc.

References calibAlgo_, calibClusterSize, calibinter, calibinterEndCapMinus, calibinterEndCapPlus, calibinterNoCuts, calibs, calibsEndCapMinus, calibsEndCapPlus, calibsNoCuts, clusterSize_, gather_cfg::cout, e25, e25NoCuts, E25oP, E25oPNoCuts, E25oPvsEta, E25oPvsEtaEndCapMinus, E25oPvsEtaEndCapPlus, e25OverScE, e25OverScENoCuts, e9, e9NoCuts, e9Overe25, e9Overe25NoCuts, EoP, EoP_all, EoPNoCuts, Error1, Error1NoCuts, Error2, Error2NoCuts, Error3, Error3NoCuts, eSeedOverPout, eSeedOverPout2, eSeedOverPout2ESeed, eSeedOverPout2NoCuts, eSeedOverPoutNoCuts, etaMax, etaMin, EventsAfterCuts, f, GeneralMap, GeneralMapBeforePt, GeneralMapEndCapMinus, GeneralMapEndCapMinusBeforePt, GeneralMapEndCapPlus, GeneralMapEndCapPlusBeforePt, hadOverEm, hadOverEmESeed, hadOverEmNoCuts, createfilelist::int, keventweight_, Map, Map3Dcalib, Map3DcalibEndCapMinus, Map3DcalibEndCapPlus, Map3DcalibNoCuts, MapCor1, MapCor10, MapCor10ESeed, MapCor10NoCuts, MapCor11, MapCor11ESeed, MapCor11NoCuts, MapCor1ESeed, MapCor1NoCuts, MapCor2, MapCor2ESeed, MapCor2NoCuts, MapCor3, MapCor3ESeed, MapCor3NoCuts, MapCor4, MapCor4ESeed, MapCor4NoCuts, MapCor5, MapCor5ESeed, MapCor5NoCuts, MapCor6, MapCor6ESeed, MapCor6NoCuts, MapCor7, MapCor7ESeed, MapCor7NoCuts, MapCor8, MapCor8ESeed, MapCor8NoCuts, MapCor9, MapCor9ESeed, MapCor9NoCuts, MapEndCapMinus, MapEndCapPlus, maxeta_, maxphi_, mineta_, minphi_, MyHH, MyL3Algo1, phiMax, phiMin, PinMinPout, PinMinPoutNoCuts, PinOverPout, PinOverPoutNoCuts, read_events, rootfile_, scE, scENoCuts, trP, trPNoCuts, and UnivL3.

55  {
56  //========================================================================
57  f = new TFile(rootfile_.c_str(), "RECREATE");
58  f->cd();
59  EventsAfterCuts = new TH1F("EventsAfterCuts", "Events After Cuts", 30, 0, 30);
60 
61  // Book histograms
62  e9 = new TH1F("e9", "E9 energy", 300, 0., 150.);
63  e25 = new TH1F("e25", "E25 energy", 300, 0., 150.);
64  scE = new TH1F("scE", "SC energy", 300, 0., 150.);
65  trP = new TH1F("trP", "Trk momentum", 300, 0., 150.);
66  EoP = new TH1F("EoP", "EoP", 600, 0., 3.);
67  EoP_all = new TH1F("EoP_all", "EoP_all", 600, 0., 3.);
68 
69  calibs = new TH1F("calib", "Calibration constants", 800, 0.5, 2.);
70  calibsEndCapMinus = new TH1F("calibEndCapMinus", "Calibration constants EE-", 800, 0.5, 2.);
71  calibsEndCapPlus = new TH1F("calibEndCapPlus", "Calibration constants EE+", 800, 0.5, 2.);
72 
73  e25OverScE = new TH1F("e25OverscE", "E25 / SC energy", 400, 0., 2.);
74  E25oP = new TH1F("E25oP", "E25 / P", 750, 0., 1.5);
75 
76  Map = new TH2F("Map", "Nb Events in Crystal", 173, -86, 86, 362, 0, 361);
77  e9Overe25 = new TH1F("e9Overe25", "E9 / E25", 400, 0., 2.);
78  Map3Dcalib = new TH2F("3Dcalib", "3Dcalib", 173, -86, 86, 362, 0, 361);
79  Map3DcalibEndCapMinus = new TH2F("3DcalibEndCapMinus", "3Dcalib EE-", 100, 0, 100, 100, 0, 100);
80  Map3DcalibEndCapPlus = new TH2F("3DcalibEndCapPlus", "3Dcalib EE+", 100, 0, 100, 100, 0, 100);
81 
82  MapCor1 = new TH2F("MapCor1", "Correlation E25/Pcalo versus E25/Pin", 100, 0., 5., 100, 0., 5.);
83  MapCor2 = new TH2F("MapCor2", "Correlation E25/Pcalo versus E/P", 100, 0., 5., 100, 0., 5.);
84  MapCor3 = new TH2F("MapCor3", "Correlation E25/Pcalo versus Pout/Pin", 100, 0., 5., 100, 0., 5.);
85  MapCor4 = new TH2F("MapCor4", "Correlation E25/Pcalo versus E25/highestP", 100, 0., 5., 100, 0., 5.);
86  MapCor5 = new TH2F("MapCor5", "Correlation E25/Pcalo versus Pcalo/Pout", 100, 0., 5., 100, 0., 5.);
87  MapCor6 = new TH2F("MapCor6", "Correlation Pout/Pin versus E25/Pin", 100, 0., 5., 100, 0., 5.);
88  MapCor7 = new TH2F("MapCor7", "Correlation Pout/Pin versus Pcalo/Pout", 100, 0., 5., 100, 0., 5.);
89  MapCor8 = new TH2F("MapCor8", "Correlation E25/Pin versus Pcalo/Pout", 100, 0., 5., 100, 0., 5.);
90  MapCor9 = new TH2F("MapCor9", "Correlation E25/Pcalo versus Eseed/Pout", 100, 0., 5., 100, 0., 5.);
91  MapCor10 = new TH2F("MapCor10", "Correlation Eseed/Pout versus Pout/Pin", 100, 0., 5., 100, 0., 5.);
92  MapCor11 = new TH2F("MapCor11", "Correlation Eseed/Pout versus E25/Pin", 100, 0., 5., 100, 0., 5.);
93  // MapCorCalib = new TH2F ("MapCorCalib", "Correlation Miscalibration versus Calibration constants", 500, 0.5,1.5, 500, 0.5, 1.5);
94 
95  E25oPvsEta = new TH2F("E25oPvsEta", "E/P vs Eta", 173, -86, 86, 600, 0.7, 1.3);
96  E25oPvsEtaEndCapMinus = new TH2F("E25oPvsEtaEndCapMinus", "E/P vs R EE-", 100, 0, 100, 600, 0.7, 1.3);
97  E25oPvsEtaEndCapPlus = new TH2F("E25oPvsEtaEndCapPlus", "E/P vs R EE+", 100, 0, 100, 600, 0.7, 1.3);
98 
99  PinMinPout = new TH1F("PinMinPout", "(Pin - Pout)/Pin", 600, -2.0, 2.0);
100 
101  calibinter = new TH1F("calibinter", "internal calibration constants", 800, 0.5, 2.);
102  PinOverPout = new TH1F("PinOverPout", "pinOverpout", 600, 0., 3.);
103  eSeedOverPout = new TH1F("eSeedOverPout", "eSeedOverpout ", 600, 0., 3.);
104  // MisCalibs = new TH1F("MisCalibs","Miscalibration constants",800,0.5,2.);
105  // RatioCalibs = new TH1F("RatioCalibs","Ratio in Calibration Constants", 800, 0.5, 2.0);
106  // DiffCalibs = new TH1F("DiffCalibs", "Difference in Calibration constants", 800, -1.0,1.0);
107  calibinterEndCapMinus = new TH1F("calibinterEndCapMinus", "internal calibration constants", 800, 0.5, 2.);
108  calibinterEndCapPlus = new TH1F("calibinterEndCapPlus", "internal calibration constants", 800, 0.5, 2.);
109  // MisCalibsEndCapMinus = new TH1F("MisCalibsEndCapMinus","Miscalibration constants",800,0.5,2.);
110  // MisCalibsEndCapPlus = new TH1F("MisCalibsEndCapPlus","Miscalibration constants",800,0.5,2.);
111  // RatioCalibsEndCapMinus = new TH1F("RatioCalibsEndCapMinus","Ratio in Calibration Constants", 800, 0.5, 2.0);
112  // RatioCalibsEndCapPlus = new TH1F("RatioCalibsEndCapPlus","Ratio in Calibration Constants", 800, 0.5, 2.0);
113  // DiffCalibsEndCapMinus = new TH1F("DiffCalibsEndCapMinus", "Difference in Calibration constants", 800, -1.0,1.0);
114  // DiffCalibsEndCapPlus = new TH1F("DiffCalibsEndCapPlus", "Difference in Calibration constants", 800, -1.0,1.0);
115  Error1 = new TH1F("Error1", "DeltaP/Pin", 800, -1.0, 1.0);
116  Error2 = new TH1F("Error2", "DeltaP/Pout", 800, -1.0, 1.0);
117  Error3 = new TH1F("Error3", "DeltaP/Pcalo", 800, -1.0, 1.0);
118  eSeedOverPout2 = new TH1F("eSeedOverPout2", "eSeedOverpout (No Supercluster)", 600, 0., 4.);
119  hadOverEm = new TH1F("hadOverEm", "Had/EM distribution", 600, -2., 2.);
120 
121  // Book histograms
122  Map3DcalibNoCuts = new TH2F("3DcalibNoCuts", "3Dcalib (Before Cuts)", 173, -86, 86, 362, 0, 361);
123  e9NoCuts = new TH1F("e9NoCuts", "E9 energy (Before Cuts)", 300, 0., 150.);
124  e25NoCuts = new TH1F("e25NoCuts", "E25 energy (Before Cuts)", 300, 0., 150.);
125  scENoCuts = new TH1F("scENoCuts", "SC energy (Before Cuts)", 300, 0., 150.);
126  trPNoCuts = new TH1F("trPNoCuts", "Trk momentum (Before Cuts)", 300, 0., 150.);
127  EoPNoCuts = new TH1F("EoPNoCuts", "EoP (Before Cuts)", 600, 0., 3.);
128  calibsNoCuts = new TH1F("calibNoCuts", "Calibration constants (Before Cuts)", 800, 0., 2.);
129  e25OverScENoCuts = new TH1F("e25OverscENoCuts", "E25 / SC energy (Before Cuts)", 400, 0., 2.);
130  E25oPNoCuts = new TH1F("E25oPNoCuts", "E25 / P (Before Cuts)", 750, 0., 1.5);
131  MapEndCapMinus = new TH2F("MapEndCapMinus", "Nb Events in Crystal (EndCap)", 100, 0, 100, 100, 0, 100);
132  MapEndCapPlus = new TH2F("MapEndCapPlus", "Nb Events in Crystal (EndCap)", 100, 0, 100, 100, 0, 100);
133  e9Overe25NoCuts = new TH1F("e9Overe25NoCuts", "E9 / E25 (Before Cuts)", 400, 0., 2.);
134  PinOverPoutNoCuts = new TH1F("PinOverPoutNoCuts", "pinOverpout (Before Cuts)", 600, 0., 3.);
135  eSeedOverPoutNoCuts = new TH1F(" eSeedOverPoutNoCuts", "eSeedOverpout (Before Cuts) ", 600, 0., 4.);
136  PinMinPoutNoCuts = new TH1F("PinMinPoutNoCuts", "(Pin - Pout)/Pin (Before Cuts)", 600, -2.0, 2.0);
137 
138  // RatioCalibsNoCuts = new TH1F("RatioCalibsNoCuts","Ratio in Calibration Constants (Before Cuts)", 800, 0.5, 2.0);
139  // DiffCalibsNoCuts = new TH1F("DiffCalibsNoCuts", "Difference in Calibration constants (Before Cuts)", 800, -1.0,1.0);
140  calibinterNoCuts = new TH1F("calibinterNoCuts", "internal calibration constants", 2000, 0.5, 2.);
141 
142  MapCor1NoCuts =
143  new TH2F("MapCor1NoCuts", "Correlation E25/PatCalo versus E25/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
144  MapCor2NoCuts =
145  new TH2F("MapCor2NoCuts", "Correlation E25/PatCalo versus E/P (Before Cuts)", 100, 0., 5., 100, 0., 5.);
146  MapCor3NoCuts =
147  new TH2F("MapCor3NoCuts", "Correlation E25/PatCalo versus Pout/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
148  MapCor4NoCuts =
149  new TH2F("MapCor4NoCuts", "Correlation E25/PatCalo versus E25/highestP (Before Cuts)", 100, 0., 5., 100, 0., 5.);
150  MapCor5NoCuts =
151  new TH2F("MapCor5NoCuts", "Correlation E25/Pcalo versus Pcalo/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
152  MapCor6NoCuts =
153  new TH2F("MapCor6NoCuts", "Correlation Pout/Pin versus E25/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
154  MapCor7NoCuts =
155  new TH2F("MapCor7NoCuts", "Correlation Pout/Pin versus Pcalo/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
156  MapCor8NoCuts =
157  new TH2F("MapCor8NoCuts", "Correlation E25/Pin versus Pcalo/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
158  MapCor9NoCuts =
159  new TH2F("MapCor9NoCuts", "Correlation E25/Pcalo versus Eseed/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
161  new TH2F("MapCor10NoCuts", "Correlation Eseed/Pout versus Pout/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
163  new TH2F("MapCor11NoCuts", "Correlation Eseed/Pout versus E25/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
164  // MapCorCalibEndCapMinus = new TH2F ("MapCorCalibEndCapMinus", "Correlation Miscalibration versus Calibration constants (EndCap)", 500, 0.5,1.5, 500, 0.5, 1.5);
165  // MapCorCalibEndCapPlus = new TH2F ("MapCorCalibEndCapPlus", "Correlation Miscalibration versus Calibration constants (EndCap)", 500, 0.5,1.5, 500, 0.5, 1.5);
166 
167  Error1NoCuts = new TH1F("Eror1NoCuts", "DeltaP/Pin (Before Cuts)", 800, -1.0, 1.0);
168  Error2NoCuts = new TH1F("Error2NoCuts", "DeltaP/Pout (Before Cuts)", 800, -1.0, 1.0);
169  Error3NoCuts = new TH1F("Error3NoCuts", "DeltaP/Pcalo (Before Cuts)", 800, -1.0, 1.0);
170  eSeedOverPout2NoCuts = new TH1F("eSeedOverPout2NoCuts", "eSeedOverpout (No Supercluster, Before Cuts)", 600, 0., 4.);
171  hadOverEmNoCuts = new TH1F("hadOverEmNoCuts", "Had/EM distribution (Before Cuts)", 600, -2., 2.);
172 
173  //Book histograms after ESeed cut
174  MapCor1ESeed =
175  new TH2F("MapCor1ESeed", "Correlation E25/Pcalo versus E25/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
176  MapCor2ESeed =
177  new TH2F("MapCor2ESeed", "Correlation E25/Pcalo versus E/P (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
178  MapCor3ESeed = new TH2F(
179  "MapCor3ESeed", "Correlation E25/Pcalo versus Pout/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
180  MapCor4ESeed = new TH2F(
181  "MapCor4ESeed", "Correlation E25/Pcalo versus E25/highestP (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
182  MapCor5ESeed = new TH2F(
183  "MapCor5ESeed", "Correlation E25/Pcalo versus Pcalo/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
184  MapCor6ESeed =
185  new TH2F("MapCor6ESeed", "Correlation Pout/Pin versus E25/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
186  MapCor7ESeed = new TH2F(
187  "MapCor7ESeed", "Correlation Pout/Pin versus Pcalo/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
188  MapCor8ESeed = new TH2F(
189  "MapCor8ESeed", "Correlation E25/Pin versus Pcalo/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
190  MapCor9ESeed = new TH2F(
191  "MapCor9ESeed", "Correlation E25/Pcalo versus Eseed/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
192  MapCor10ESeed = new TH2F(
193  "MapCor10ESeed", "Correlation Eseed/Pout versus Pout/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
194  MapCor11ESeed = new TH2F(
195  "MapCor11ESeed", "Correlation Eseed/Pout versus E25/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
196 
198  new TH1F("eSeedOverPout2ESeed", "eSeedOverpout (No Supercluster, after Eseed/Pout cut)", 600, 0., 4.);
199 
200  hadOverEmESeed = new TH1F("hadOverEmESeed", "Had/EM distribution (after Eseed/Pout cut)", 600, -2., 2.);
201 
202  //Book histograms without any cut
203  GeneralMap = new TH2F("GeneralMap", "Map without any cuts", 173, -86, 86, 362, 0, 361);
204  GeneralMapEndCapMinus = new TH2F("GeneralMapEndCapMinus", "Map without any cuts", 100, 0, 100, 100, 0, 100);
205  GeneralMapEndCapPlus = new TH2F("GeneralMapEndCapPlus", "Map without any cuts", 100, 0, 100, 100, 0, 100);
206  GeneralMapBeforePt = new TH2F("GeneralMapBeforePt", "Map without any cuts", 173, -86, 86, 362, 0, 361);
208  new TH2F("GeneralMapEndCapMinusBeforePt", "Map without any cuts", 100, 0, 100, 100, 0, 100);
210  new TH2F("GeneralMapEndCapPlusBeforePt", "Map without any cuts", 100, 0, 100, 100, 0, 100);
211 
213  etaMin = int(mineta_);
214  etaMax = int(maxeta_);
215  phiMin = int(minphi_);
216  phiMax = int(maxphi_);
217  if (calibAlgo_ == "L3") {
219  } else {
220  if (calibAlgo_ == "L3Univ") {
222  } else {
223  if (calibAlgo_ == "HH" || calibAlgo_ == "HHReg") {
225  } else {
226  std::cout << " Name of Algorithm is not recognize " << calibAlgo_
227  << " Should be either L3, HH or HHReg. Abort! " << std::endl;
228  }
229  }
230  }
231  read_events = 0;
232 }
MinL3AlgoUniv< DetId > * UnivL3
HouseholderDecomposition * MyHH

◆ beginRun()

void ElectronCalibrationUniv::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
override

Definition at line 235 of file ElectronCalibrationUniv.cc.

References edm::EventSetup::getData(), theCaloTopology_, and topologyToken_.

235  {
236  //========================================================================
237 
238  //To Deal with Geometry:
239  theCaloTopology_ = &iSetup.getData(topologyToken_);
240 }
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
const CaloTopology * theCaloTopology_

◆ endJob()

void ElectronCalibrationUniv::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 248 of file ElectronCalibrationUniv.cc.

References calibAlgo_, calibinter, calibinterEndCapMinus, calibinterEndCapPlus, calibinterNoCuts, calibs, calibsEndCapMinus, calibsEndCapPlus, calibsNoCuts, gather_cfg::cout, e25, e25NoCuts, E25oP, E25oPNoCuts, E25oPvsEta, E25oPvsEtaEndCapMinus, E25oPvsEtaEndCapPlus, e25OverScE, e25OverScENoCuts, e9, e9NoCuts, e9Overe25, e9Overe25NoCuts, mps_fire::end, EnergyVector, EoP, EoP_all, EoPNoCuts, Error1, Error1NoCuts, Error2, Error2NoCuts, Error3, Error3NoCuts, eSeedOverPout, eSeedOverPout2, eSeedOverPout2ESeed, eSeedOverPout2NoCuts, eSeedOverPoutNoCuts, EventMatrix, EventsAfterCuts, f, GeneralMap, GeneralMapBeforePt, GeneralMapEndCapMinus, GeneralMapEndCapMinusBeforePt, GeneralMapEndCapPlus, GeneralMapEndCapPlusBeforePt, hadOverEm, hadOverEmESeed, hadOverEmNoCuts, EBDetId::ieta(), EBDetId::iphi(), MinL3Algorithm::iterate(), MinL3AlgoUniv< IDdet >::iterate(), HouseholderDecomposition::iterate(), EEDetId::ix(), EEDetId::iy(), Map, Map3Dcalib, Map3DcalibEndCapMinus, Map3DcalibEndCapPlus, Map3DcalibNoCuts, MapCor1, MapCor10, MapCor10ESeed, MapCor10NoCuts, MapCor11, MapCor11ESeed, MapCor11NoCuts, MapCor1ESeed, MapCor1NoCuts, MapCor2, MapCor2ESeed, MapCor2NoCuts, MapCor3, MapCor3ESeed, MapCor3NoCuts, MapCor4, MapCor4ESeed, MapCor4NoCuts, MapCor5, MapCor5ESeed, MapCor5NoCuts, MapCor6, MapCor6ESeed, MapCor6NoCuts, MapCor7, MapCor7ESeed, MapCor7NoCuts, MapCor8, MapCor8ESeed, MapCor8NoCuts, MapCor9, MapCor9ESeed, MapCor9NoCuts, MapEndCapMinus, MapEndCapPlus, MaxCCeta, MaxCCphi, maxeta_, maxphi_, mineta_, minphi_, MyHH, MyL3Algo1, PinMinPout, PinMinPoutNoCuts, PinOverPout, PinOverPoutNoCuts, read_events, HouseholderDecomposition::runRegional(), scE, scENoCuts, solution, command_line::start, DetId::subdetId(), protons_cff::time, trP, trPNoCuts, UnivEventIds, UnivL3, Univsolution, calibXMLwriter::writeLine(), and EEDetId::zside().

Referenced by o2olib.O2ORunMgr::executeJob().

248  {
249  //========================================================================
250 
251  f->cd();
252  time_t start, end;
253  time_t cpu_time_used;
254  start = time(nullptr);
255 
256  //In order to do only one loop to use properly looper properties, ask only for 1 iterations!
257  int nIterations = 10;
258  if (calibAlgo_ == "L3") {
260  } else {
261  if (calibAlgo_ == "L3Univ") {
262  //Univsolution= UnivL3->getSolution();
263  // std::cout<<" Should derive solution "<<EnergyVector.size()<<std::endl;
265  //std::cout<<" solution size "<<Univsolution.size()<<std::endl;
266  } else {
267  if (calibAlgo_ == "HH") {
269  } else {
270  if (calibAlgo_ == "HHReg") {
272  } else {
273  std::cout << " Calibration not run due to problem in Algo Choice..." << std::endl;
274  return;
275  }
276  }
277  }
278  }
279  end = time(nullptr);
280  cpu_time_used = end - start;
281  // std::cout<<"222 solution size "<<Univsolution.size()<<std::endl;
282 
283  calibXMLwriter write_calibrations;
284 
285  // FILE* MisCalib;
286  // //char* calibfile="miscalibfile";
287  // MisCalib = fopen(miscalibfile_.c_str(),"r");
288 
289  // int fileStatus=0;
290  // int eta=-1;
291  // int phi=-1;
292  // float coeff=-1;
293 
294  std::map<EBDetId, float> OldCoeff;
295 
296  // while(fileStatus != EOF) {
297  // fileStatus = fscanf(MisCalib,"%d %d %f\n", &eta,&phi,&coeff);
298  // if(eta!=-1&&phi!=-1&& coeff!=-1){
299  // // std::cout<<" We have read correctly the coefficient " << coeff << " corresponding to eta "<<eta<<" and phi "<<phi<<std::endl;
300  // OldCoeff.insert(std::make_pair(EBDetId(eta,phi,EBDetId::ETAPHIMODE),coeff ));
301  // }
302  // }
303 
304  // fclose(MisCalib);
305  // FILE* MisCalibEndCap;
306  // //char* calibfile="miscalibfile";
307  // MisCalibEndCap = fopen(miscalibfileEndCap_.c_str(),"r");
308 
309  // int fileStatus2=0;
310  // int X=-1;
311  // int Y=-1;
312  // float coeff2=-1;
313  std::map<EEDetId, float> OldCoeffEndCap;
314 
315  // while(fileStatus2 != EOF) {
316  // fileStatus2 = fscanf(MisCalibEndCap,"%d %d %f\n", &X,&Y,&coeff2);
317  // if(X!=-1&&Y!=-1&& coeff2!=-1){
318  // // std::cout<<" We have read correctly the coefficient " << coeff << " corresponding to eta "<<eta<<" and phi "<<phi<<std::endl;
319  // if(TestEEvalidDetId(X,Y,1)){
320  // OldCoeffEndCap.insert(std::make_pair(EEDetId(X,Y,1,EEDetId::XYMODE),coeff2 ));
321  // }
322  // }
323  // }
324 
325  // fclose(MisCalibEndCap);
326  std::map<DetId, float>::const_iterator itmap;
327  for (itmap = Univsolution.begin(); itmap != Univsolution.end(); itmap++) {
328  const DetId Id(itmap->first);
329  if (Id.subdetId() == 1) {
330  const EBDetId IChannelDetId(itmap->first);
331  if (IChannelDetId.ieta() < mineta_) {
332  continue;
333  }
334  if (IChannelDetId.ieta() > maxeta_) {
335  continue;
336  }
337  if (IChannelDetId.iphi() < minphi_) {
338  continue;
339  }
340  if (IChannelDetId.iphi() > maxphi_) {
341  continue;
342  }
343  // float Compare=1;
344  // std::map<EBDetId,float>::iterator iter = OldCoeff.find(itmap->first);
345  // if( iter != OldCoeff.end() )Compare = iter->second;
346  Map3Dcalib->Fill(IChannelDetId.ieta(), IChannelDetId.iphi(), itmap->second);
347  calibs->Fill(itmap->second);
348  //DiffCalibs->Fill(newCalibs[icry]-miscalib[IChannelDetId.ieta()-1][IChannelDetId.iphi()-21]);
349  //RatioCalibs->Fill(newCalibs[icry]/miscalib[IChannelDetId.ieta()-1][IChannelDetId.iphi()-21]);
350  if (IChannelDetId.ieta() < mineta_ + 2) {
351  continue;
352  }
353  if (IChannelDetId.ieta() > maxeta_ - 2) {
354  continue;
355  }
356  if (IChannelDetId.iphi() < minphi_ + 2) {
357  continue;
358  }
359  if (IChannelDetId.iphi() > maxphi_ - 2) {
360  continue;
361  }
362  write_calibrations.writeLine(IChannelDetId, itmap->second);
363  calibinter->Fill(itmap->second);
364  // MapCorCalib->Fill(itmap->second,Compare);
365  // DiffCalibs->Fill(itmap->second-Compare);
366  // RatioCalibs->Fill(itmap->second*Compare);
367  } else {
368  const EEDetId IChannelDetId(itmap->first);
369  // if (IChannelDetId.ix()<0 ){continue;}
370  // if (IChannelDetId.ix()>100 ){continue;}
371  // if (IChannelDetId.iy()<0 ){continue;}
372  // if (IChannelDetId.iy()>100 ){continue;}
373  // std::map<EEDetId,float>::iterator iter = OldCoeffEndCap.find(itmap->first);
374  // float Compare=1;
375  // if( iter != OldCoeffEndCap.end() )Compare = iter->second;
376  if (IChannelDetId.zside() < 0) {
377  Map3DcalibEndCapMinus->Fill(IChannelDetId.ix(), IChannelDetId.iy(), itmap->second);
378  calibsEndCapMinus->Fill(itmap->second);
379  calibinterEndCapMinus->Fill(itmap->second);
380  // DiffCalibsEndCapMinus->Fill(itmap->second-Compare);
381  // RatioCalibsEndCapMinus->Fill(itmap->second*Compare);
382  // MapCorCalibEndCapMinus->Fill(itmap->second,Compare);
383  } else {
384  Map3DcalibEndCapPlus->Fill(IChannelDetId.ix(), IChannelDetId.iy(), itmap->second);
385  calibsEndCapPlus->Fill(itmap->second);
386  calibinterEndCapPlus->Fill(itmap->second);
387  // DiffCalibsEndCapPlus->Fill(itmap->second-Compare);
388  // RatioCalibsEndCapPlus->Fill(itmap->second*Compare);
389  // MapCorCalibEndCapPlus->Fill(itmap->second,Compare);
390  }
391  write_calibrations.writeLine(IChannelDetId, itmap->second);
392  }
393  }
394  EventsAfterCuts->Write();
395 
396  // Book histograms
397  e25->Write();
398  e9->Write();
399  scE->Write();
400  trP->Write();
401  EoP->Write();
402  EoP_all->Write();
403  calibs->Write();
404  calibsEndCapMinus->Write();
405  calibsEndCapPlus->Write();
406  e9Overe25->Write();
407  e25OverScE->Write();
408  Map->Write();
409  E25oP->Write();
410 
411  PinOverPout->Write();
412  eSeedOverPout->Write();
413  // MisCalibs->Write();
414  // RatioCalibs->Write();
415  // DiffCalibs->Write();
416  // RatioCalibsNoCuts->Write();
417  // DiffCalibsNoCuts->Write();
418  // MisCalibsEndCapMinus->Write();
419  // MisCalibsEndCapPlus->Write();
420  // RatioCalibsEndCapMinus->Write();
421  // RatioCalibsEndCapPlus->Write();
422  // DiffCalibsEndCapMinus->Write();
423  // DiffCalibsEndCapPlus->Write();
424 
425  e25NoCuts->Write();
426  e9NoCuts->Write();
427  scENoCuts->Write();
428  trPNoCuts->Write();
429  EoPNoCuts->Write();
430  calibsNoCuts->Write();
431  e9Overe25NoCuts->Write();
432  e25OverScENoCuts->Write();
433  MapEndCapMinus->Write();
434  MapEndCapPlus->Write();
435  E25oPNoCuts->Write();
436  Map3Dcalib->Write();
437  Map3DcalibEndCapMinus->Write();
438  Map3DcalibEndCapPlus->Write();
439  Map3DcalibNoCuts->Write();
440  calibinter->Write();
441  calibinterEndCapMinus->Write();
442  calibinterEndCapPlus->Write();
443  calibinterNoCuts->Write();
444  PinOverPoutNoCuts->Write();
445  eSeedOverPoutNoCuts->Write();
446 
447  GeneralMap->Write();
448  GeneralMapEndCapMinus->Write();
449  GeneralMapEndCapPlus->Write();
450  GeneralMapBeforePt->Write();
453 
454  MapCor1->Write();
455  MapCor2->Write();
456  MapCor3->Write();
457  MapCor4->Write();
458  MapCor5->Write();
459  MapCor6->Write();
460  MapCor7->Write();
461  MapCor8->Write();
462  MapCor9->Write();
463  MapCor10->Write();
464  MapCor11->Write();
465  // MapCorCalib->Write();
466 
467  MapCor1NoCuts->Write();
468  MapCor2NoCuts->Write();
469  MapCor3NoCuts->Write();
470  MapCor4NoCuts->Write();
471  MapCor5NoCuts->Write();
472  MapCor6NoCuts->Write();
473  MapCor7NoCuts->Write();
474  MapCor8NoCuts->Write();
475  MapCor9NoCuts->Write();
476  MapCor10NoCuts->Write();
477  MapCor11NoCuts->Write();
478  // MapCorCalibEndCapMinus->Write();
479  // MapCorCalibEndCapPlus->Write();
480 
481  MapCor1ESeed->Write();
482  MapCor2ESeed->Write();
483  MapCor3ESeed->Write();
484  MapCor4ESeed->Write();
485  MapCor5ESeed->Write();
486  MapCor6ESeed->Write();
487  MapCor7ESeed->Write();
488  MapCor8ESeed->Write();
489  MapCor9ESeed->Write();
490  MapCor10ESeed->Write();
491  MapCor11ESeed->Write();
492 
493  E25oPvsEta->Write();
494  E25oPvsEtaEndCapMinus->Write();
495  E25oPvsEtaEndCapPlus->Write();
496 
497  PinMinPout->Write();
498  PinMinPoutNoCuts->Write();
499 
500  Error1->Write();
501  Error2->Write();
502  Error3->Write();
503  Error1NoCuts->Write();
504  Error2NoCuts->Write();
505  Error3NoCuts->Write();
506 
507  eSeedOverPout2->Write();
508  eSeedOverPout2NoCuts->Write();
509  eSeedOverPout2ESeed->Write();
510 
511  hadOverEm->Write();
512  hadOverEmNoCuts->Write();
513  hadOverEmESeed->Write();
514 
515  f->Write();
516 
517  f->Close();
518  // if(MyL3Algo1)delete MyL3Algo1;
519  // if(UnivL3)delete UnivL3;
520  // if(MyHH)delete MyHH;
521  // delete f;
523 
524  std::cout << " " << std::endl;
525  std::cout << "************* STATISTICS **************" << std::endl;
526  std::cout << " Events Studied " << read_events << std::endl;
527  std::cout << "Timing info:" << std::endl;
528  std::cout << "CPU time usage -- calibrating: " << cpu_time_used << " sec." << std::endl;
529 
531 }
Definition: start.py:1
std::vector< std::vector< float > > EventMatrix
MinL3AlgoUniv< DetId > * UnivL3
std::vector< std::vector< DetId > > UnivEventIds
std::vector< float > iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)
std::map< DetId, float > Univsolution
HouseholderDecomposition * MyHH
Definition: DetId.h:17
std::vector< float > runRegional(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const int &regLength=5)
void writeLine(EBDetId const &, float)
IDmap iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< std::vector< IDdet > > &idMatrix, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)
Definition: MinL3AlgoUniv.h:76
std::vector< float > EnergyVector
std::vector< float > iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)

◆ endRun()

void ElectronCalibrationUniv::endRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
override

Definition at line 243 of file ElectronCalibrationUniv.cc.

243 {}

◆ findMaxHit()

DetId ElectronCalibrationUniv::findMaxHit ( const std::vector< DetId > &  v1,
const EBRecHitCollection EBhits,
const EERecHitCollection EEhits 
)
private

Definition at line 533 of file ElectronCalibrationUniv.cc.

References gather_cfg::cout, edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), and MTVHistoProducerAlgoForTrackerBlock_cfi::maxHit.

Referenced by analyze().

535  {
536  //=================================================================================
537 
538  double currEnergy = 0.;
539  DetId maxHit;
540 
541  for (std::vector<DetId>::const_iterator idsIt = v1.begin(); idsIt != v1.end(); ++idsIt) {
542  if (idsIt->subdetId() == 1) {
544  itrechit = EBhits->find(*idsIt);
545  if (itrechit == EBhits->end()) {
546  std::cout << "ElectronCalibration::findMaxHit: rechit not found! " << (EBDetId)(*idsIt) << std::endl;
547  continue;
548  }
549  if (itrechit->energy() > currEnergy) {
550  currEnergy = itrechit->energy();
551  maxHit = *idsIt;
552  }
553  } else {
555  itrechit = EEhits->find(*idsIt);
556  if (itrechit == EEhits->end()) {
557  std::cout << "ElectronCalibration::findMaxHit: rechit not found! idsIt = " << (EEDetId)(*idsIt) << std::endl;
558  continue;
559  }
560 
561  if (itrechit->energy() > currEnergy) {
562  currEnergy = itrechit->energy();
563  maxHit = *idsIt;
564  }
565  }
566  }
567 
568  return maxHit;
569 }
std::vector< EcalRecHit >::const_iterator const_iterator
const_iterator end() const
Definition: DetId.h:17
iterator find(key_type k)

◆ TestEEvalidDetId()

bool ElectronCalibrationUniv::TestEEvalidDetId ( int  crystal_ix,
int  crystal_iy,
int  iz 
)
private

Definition at line 571 of file ElectronCalibrationUniv.cc.

References funct::abs(), and validateGeometry_cfg::valid.

571  {
572  bool valid = false;
573  if (crystal_ix < 1 || crystal_ix > 100 || crystal_iy < 1 || crystal_iy > 100 || abs(iz) != 1) {
574  return valid;
575  }
576  if ((crystal_ix >= 1 && crystal_ix <= 3 && (crystal_iy <= 40 || crystal_iy > 60)) ||
577  (crystal_ix >= 4 && crystal_ix <= 5 && (crystal_iy <= 35 || crystal_iy > 65)) ||
578  (crystal_ix >= 6 && crystal_ix <= 8 && (crystal_iy <= 25 || crystal_iy > 75)) ||
579  (crystal_ix >= 9 && crystal_ix <= 13 && (crystal_iy <= 20 || crystal_iy > 80)) ||
580  (crystal_ix >= 14 && crystal_ix <= 15 && (crystal_iy <= 15 || crystal_iy > 85)) ||
581  (crystal_ix >= 16 && crystal_ix <= 20 && (crystal_iy <= 13 || crystal_iy > 87)) ||
582  (crystal_ix >= 21 && crystal_ix <= 25 && (crystal_iy <= 8 || crystal_iy > 92)) ||
583  (crystal_ix >= 26 && crystal_ix <= 35 && (crystal_iy <= 5 || crystal_iy > 95)) ||
584  (crystal_ix >= 36 && crystal_ix <= 39 && (crystal_iy <= 3 || crystal_iy > 97)) ||
585  (crystal_ix >= 98 && crystal_ix <= 100 && (crystal_iy <= 40 || crystal_iy > 60)) ||
586  (crystal_ix >= 96 && crystal_ix <= 97 && (crystal_iy <= 35 || crystal_iy > 65)) ||
587  (crystal_ix >= 93 && crystal_ix <= 95 && (crystal_iy <= 25 || crystal_iy > 75)) ||
588  (crystal_ix >= 88 && crystal_ix <= 92 && (crystal_iy <= 20 || crystal_iy > 80)) ||
589  (crystal_ix >= 86 && crystal_ix <= 87 && (crystal_iy <= 15 || crystal_iy > 85)) ||
590  (crystal_ix >= 81 && crystal_ix <= 85 && (crystal_iy <= 13 || crystal_iy > 87)) ||
591  (crystal_ix >= 76 && crystal_ix <= 80 && (crystal_iy <= 8 || crystal_iy > 92)) ||
592  (crystal_ix >= 66 && crystal_ix <= 75 && (crystal_iy <= 5 || crystal_iy > 95)) ||
593  (crystal_ix >= 62 && crystal_ix <= 65 && (crystal_iy <= 3 || crystal_iy > 97)) ||
594  ((crystal_ix == 40 || crystal_ix == 61) &&
595  ((crystal_iy >= 46 && crystal_iy <= 55) || crystal_iy <= 3 || crystal_iy > 97)) ||
596  ((crystal_ix == 41 || crystal_ix == 60) && crystal_iy >= 44 && crystal_iy <= 57) ||
597  ((crystal_ix == 42 || crystal_ix == 59) && crystal_iy >= 43 && crystal_iy <= 58) ||
598  ((crystal_ix == 43 || crystal_ix == 58) && crystal_iy >= 42 && crystal_iy <= 59) ||
599  ((crystal_ix == 44 || crystal_ix == 45 || crystal_ix == 57 || crystal_ix == 56) && crystal_iy >= 41 &&
600  crystal_iy <= 60) ||
601  (crystal_ix >= 46 && crystal_ix <= 55 && crystal_iy >= 40 && crystal_iy <= 61)) {
602  return valid;
603  }
604  valid = true;
605  return valid;
606 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

◆ calibAlgo_

const std::string ElectronCalibrationUniv::calibAlgo_
private

Definition at line 79 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibClusterSize

int ElectronCalibrationUniv::calibClusterSize
private

Definition at line 104 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ calibinter

TH1F* ElectronCalibrationUniv::calibinter
private

Definition at line 181 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibinterEndCapMinus

TH1F* ElectronCalibrationUniv::calibinterEndCapMinus
private

Definition at line 182 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibinterEndCapPlus

TH1F* ElectronCalibrationUniv::calibinterEndCapPlus
private

Definition at line 183 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibinterNoCuts

TH1F* ElectronCalibrationUniv::calibinterNoCuts
private

Definition at line 184 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibs

TH1F* ElectronCalibrationUniv::calibs
private

Definition at line 144 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibsEndCapMinus

TH1F* ElectronCalibrationUniv::calibsEndCapMinus
private

Definition at line 145 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibsEndCapPlus

TH1F* ElectronCalibrationUniv::calibsEndCapPlus
private

Definition at line 146 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ calibsNoCuts

TH1F* ElectronCalibrationUniv::calibsNoCuts
private

Definition at line 171 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ clusterSize_

const int ElectronCalibrationUniv::clusterSize_
private

Definition at line 99 of file ElectronCalibrationUniv.h.

Referenced by analyze(), and beginJob().

◆ cut1_

const double ElectronCalibrationUniv::cut1_
private

Definition at line 88 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ cut2_

const double ElectronCalibrationUniv::cut2_
private

Definition at line 89 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ cut3_

const double ElectronCalibrationUniv::cut3_
private

Definition at line 90 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ cutCalo1_

const double ElectronCalibrationUniv::cutCalo1_
private

Definition at line 96 of file ElectronCalibrationUniv.h.

◆ cutCalo2_

const double ElectronCalibrationUniv::cutCalo2_
private

Definition at line 97 of file ElectronCalibrationUniv.h.

◆ cutEPCalo1_

const double ElectronCalibrationUniv::cutEPCalo1_
private

Definition at line 92 of file ElectronCalibrationUniv.h.

◆ cutEPCalo2_

const double ElectronCalibrationUniv::cutEPCalo2_
private

Definition at line 93 of file ElectronCalibrationUniv.h.

◆ cutEPin1_

const double ElectronCalibrationUniv::cutEPin1_
private

Definition at line 94 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ cutEPin2_

const double ElectronCalibrationUniv::cutEPin2_
private

Definition at line 95 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ cutESeed_

const double ElectronCalibrationUniv::cutESeed_
private

Definition at line 98 of file ElectronCalibrationUniv.h.

◆ e25

TH1F* ElectronCalibrationUniv::e25
private

Definition at line 138 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e25NoCuts

TH1F* ElectronCalibrationUniv::e25NoCuts
private

Definition at line 166 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ E25oP

TH1F* ElectronCalibrationUniv::E25oP
private

Definition at line 150 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ E25oPNoCuts

TH1F* ElectronCalibrationUniv::E25oPNoCuts
private

Definition at line 176 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ E25oPvsEta

TH2F* ElectronCalibrationUniv::E25oPvsEta
private

Definition at line 235 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ E25oPvsEtaEndCapMinus

TH2F* ElectronCalibrationUniv::E25oPvsEtaEndCapMinus
private

Definition at line 236 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ E25oPvsEtaEndCapPlus

TH2F* ElectronCalibrationUniv::E25oPvsEtaEndCapPlus
private

Definition at line 237 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e25OverScE

TH1F* ElectronCalibrationUniv::e25OverScE
private

Definition at line 148 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e25OverScENoCuts

TH1F* ElectronCalibrationUniv::e25OverScENoCuts
private

Definition at line 173 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e9

TH1F* ElectronCalibrationUniv::e9
private

Definition at line 139 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e9NoCuts

TH1F* ElectronCalibrationUniv::e9NoCuts
private

Definition at line 167 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e9Overe25

TH1F* ElectronCalibrationUniv::e9Overe25
private

Definition at line 147 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ e9Overe25NoCuts

TH1F* ElectronCalibrationUniv::e9Overe25NoCuts
private

Definition at line 172 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ ebRecHitLabel_

const edm::InputTag ElectronCalibrationUniv::ebRecHitLabel_
private

Definition at line 75 of file ElectronCalibrationUniv.h.

◆ ebRecHitToken_

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

Definition at line 119 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ eeRecHitLabel_

const edm::InputTag ElectronCalibrationUniv::eeRecHitLabel_
private

Definition at line 76 of file ElectronCalibrationUniv.h.

◆ eeRecHitToken_

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

Definition at line 120 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ elecclass_

const int ElectronCalibrationUniv::elecclass_
private

Definition at line 100 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ electronLabel_

const edm::InputTag ElectronCalibrationUniv::electronLabel_
private

Definition at line 77 of file ElectronCalibrationUniv.h.

◆ elePt_

const double ElectronCalibrationUniv::elePt_
private

Definition at line 83 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ EnergyVector

std::vector<float> ElectronCalibrationUniv::EnergyVector
private

Definition at line 106 of file ElectronCalibrationUniv.h.

Referenced by analyze(), and endJob().

◆ EnergyVectorNoCuts

std::vector<float> ElectronCalibrationUniv::EnergyVectorNoCuts
private

Definition at line 111 of file ElectronCalibrationUniv.h.

◆ EoP

TH1F* ElectronCalibrationUniv::EoP
private

Definition at line 142 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ EoP_all

TH1F* ElectronCalibrationUniv::EoP_all
private

Definition at line 143 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ EoPNoCuts

TH1F* ElectronCalibrationUniv::EoPNoCuts
private

Definition at line 170 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Error1

TH1F* ElectronCalibrationUniv::Error1
private

Definition at line 242 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Error1NoCuts

TH1F* ElectronCalibrationUniv::Error1NoCuts
private

Definition at line 245 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Error2

TH1F* ElectronCalibrationUniv::Error2
private

Definition at line 243 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Error2NoCuts

TH1F* ElectronCalibrationUniv::Error2NoCuts
private

Definition at line 246 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Error3

TH1F* ElectronCalibrationUniv::Error3
private

Definition at line 244 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Error3NoCuts

TH1F* ElectronCalibrationUniv::Error3NoCuts
private

Definition at line 247 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ eSeedOverPout

TH1F* ElectronCalibrationUniv::eSeedOverPout
private

Definition at line 153 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ eSeedOverPout2

TH1F* ElectronCalibrationUniv::eSeedOverPout2
private

Definition at line 249 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ eSeedOverPout2ESeed

TH1F* ElectronCalibrationUniv::eSeedOverPout2ESeed
private

Definition at line 251 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ eSeedOverPout2NoCuts

TH1F* ElectronCalibrationUniv::eSeedOverPout2NoCuts
private

Definition at line 250 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ eSeedOverPoutNoCuts

TH1F* ElectronCalibrationUniv::eSeedOverPoutNoCuts
private

Definition at line 187 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ etaMax

int ElectronCalibrationUniv::etaMax
private

Definition at line 105 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ etaMin

int ElectronCalibrationUniv::etaMin
private

Definition at line 105 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ EventMatrix

std::vector<std::vector<float> > ElectronCalibrationUniv::EventMatrix
private

Definition at line 108 of file ElectronCalibrationUniv.h.

Referenced by analyze(), and endJob().

◆ EventMatrixNoCuts

std::vector<std::vector<float> > ElectronCalibrationUniv::EventMatrixNoCuts
private

Definition at line 113 of file ElectronCalibrationUniv.h.

◆ EventsAfterCuts

TH1F* ElectronCalibrationUniv::EventsAfterCuts
private

Definition at line 136 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ f

TFile* ElectronCalibrationUniv::f
private

◆ GeneralMap

TH2F* ElectronCalibrationUniv::GeneralMap
private

Definition at line 189 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ GeneralMapBeforePt

TH2F* ElectronCalibrationUniv::GeneralMapBeforePt
private

Definition at line 192 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ GeneralMapEndCapMinus

TH2F* ElectronCalibrationUniv::GeneralMapEndCapMinus
private

Definition at line 190 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ GeneralMapEndCapMinusBeforePt

TH2F* ElectronCalibrationUniv::GeneralMapEndCapMinusBeforePt
private

Definition at line 193 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ GeneralMapEndCapPlus

TH2F* ElectronCalibrationUniv::GeneralMapEndCapPlus
private

Definition at line 191 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ GeneralMapEndCapPlusBeforePt

TH2F* ElectronCalibrationUniv::GeneralMapEndCapPlusBeforePt
private

Definition at line 194 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ gsfElectronToken_

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

Definition at line 121 of file ElectronCalibrationUniv.h.

Referenced by analyze().

◆ hadOverEm

TH1F* ElectronCalibrationUniv::hadOverEm
private

Definition at line 253 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ hadOverEmESeed

TH1F* ElectronCalibrationUniv::hadOverEmESeed
private

Definition at line 255 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ hadOverEmNoCuts

TH1F* ElectronCalibrationUniv::hadOverEmNoCuts
private

Definition at line 254 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ keventweight

int ElectronCalibrationUniv::keventweight
private

Definition at line 104 of file ElectronCalibrationUniv.h.

◆ keventweight_

const int ElectronCalibrationUniv::keventweight_
private

Definition at line 82 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ Map

TH2F* ElectronCalibrationUniv::Map
private

Definition at line 149 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ Map3Dcalib

TH2F* ElectronCalibrationUniv::Map3Dcalib
private

Definition at line 177 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ Map3DcalibEndCapMinus

TH2F* ElectronCalibrationUniv::Map3DcalibEndCapMinus
private

Definition at line 178 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ Map3DcalibEndCapPlus

TH2F* ElectronCalibrationUniv::Map3DcalibEndCapPlus
private

Definition at line 179 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ Map3DcalibNoCuts

TH2F* ElectronCalibrationUniv::Map3DcalibNoCuts
private

Definition at line 180 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor1

TH2F* ElectronCalibrationUniv::MapCor1
private

Definition at line 196 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor10

TH2F* ElectronCalibrationUniv::MapCor10
private

Definition at line 205 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor10ESeed

TH2F* ElectronCalibrationUniv::MapCor10ESeed
private

Definition at line 232 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor10NoCuts

TH2F* ElectronCalibrationUniv::MapCor10NoCuts
private

Definition at line 218 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor11

TH2F* ElectronCalibrationUniv::MapCor11
private

Definition at line 206 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor11ESeed

TH2F* ElectronCalibrationUniv::MapCor11ESeed
private

Definition at line 233 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor11NoCuts

TH2F* ElectronCalibrationUniv::MapCor11NoCuts
private

Definition at line 219 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor1ESeed

TH2F* ElectronCalibrationUniv::MapCor1ESeed
private

Definition at line 223 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor1NoCuts

TH2F* ElectronCalibrationUniv::MapCor1NoCuts
private

Definition at line 209 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor2

TH2F* ElectronCalibrationUniv::MapCor2
private

Definition at line 197 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor2ESeed

TH2F* ElectronCalibrationUniv::MapCor2ESeed
private

Definition at line 224 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor2NoCuts

TH2F* ElectronCalibrationUniv::MapCor2NoCuts
private

Definition at line 210 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor3

TH2F* ElectronCalibrationUniv::MapCor3
private

Definition at line 198 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor3ESeed

TH2F* ElectronCalibrationUniv::MapCor3ESeed
private

Definition at line 225 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor3NoCuts

TH2F* ElectronCalibrationUniv::MapCor3NoCuts
private

Definition at line 211 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor4

TH2F* ElectronCalibrationUniv::MapCor4
private

Definition at line 199 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor4ESeed

TH2F* ElectronCalibrationUniv::MapCor4ESeed
private

Definition at line 226 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor4NoCuts

TH2F* ElectronCalibrationUniv::MapCor4NoCuts
private

Definition at line 212 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor5

TH2F* ElectronCalibrationUniv::MapCor5
private

Definition at line 200 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor5ESeed

TH2F* ElectronCalibrationUniv::MapCor5ESeed
private

Definition at line 227 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor5NoCuts

TH2F* ElectronCalibrationUniv::MapCor5NoCuts
private

Definition at line 213 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor6

TH2F* ElectronCalibrationUniv::MapCor6
private

Definition at line 201 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor6ESeed

TH2F* ElectronCalibrationUniv::MapCor6ESeed
private

Definition at line 228 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor6NoCuts

TH2F* ElectronCalibrationUniv::MapCor6NoCuts
private

Definition at line 214 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor7

TH2F* ElectronCalibrationUniv::MapCor7
private

Definition at line 202 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor7ESeed

TH2F* ElectronCalibrationUniv::MapCor7ESeed
private

Definition at line 229 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor7NoCuts

TH2F* ElectronCalibrationUniv::MapCor7NoCuts
private

Definition at line 215 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor8

TH2F* ElectronCalibrationUniv::MapCor8
private

Definition at line 203 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor8ESeed

TH2F* ElectronCalibrationUniv::MapCor8ESeed
private

Definition at line 230 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor8NoCuts

TH2F* ElectronCalibrationUniv::MapCor8NoCuts
private

Definition at line 216 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor9

TH2F* ElectronCalibrationUniv::MapCor9
private

Definition at line 204 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapCor9ESeed

TH2F* ElectronCalibrationUniv::MapCor9ESeed
private

Definition at line 231 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MapCor9NoCuts

TH2F* ElectronCalibrationUniv::MapCor9NoCuts
private

Definition at line 217 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapEndCapMinus

TH2F* ElectronCalibrationUniv::MapEndCapMinus
private

Definition at line 174 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MapEndCapPlus

TH2F* ElectronCalibrationUniv::MapEndCapPlus
private

Definition at line 175 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ MaxCCeta

std::vector<int> ElectronCalibrationUniv::MaxCCeta
private

Definition at line 109 of file ElectronCalibrationUniv.h.

Referenced by endJob().

◆ MaxCCetaNoCuts

std::vector<int> ElectronCalibrationUniv::MaxCCetaNoCuts
private

Definition at line 114 of file ElectronCalibrationUniv.h.

◆ MaxCCphi

std::vector<int> ElectronCalibrationUniv::MaxCCphi
private

Definition at line 110 of file ElectronCalibrationUniv.h.

Referenced by endJob().

◆ MaxCCphiNoCuts

std::vector<int> ElectronCalibrationUniv::MaxCCphiNoCuts
private

Definition at line 115 of file ElectronCalibrationUniv.h.

◆ maxeta_

const int ElectronCalibrationUniv::maxeta_
private

Definition at line 84 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ maxphi_

const int ElectronCalibrationUniv::maxphi_
private

Definition at line 86 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ mineta_

const int ElectronCalibrationUniv::mineta_
private

Definition at line 85 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ minphi_

const int ElectronCalibrationUniv::minphi_
private

Definition at line 87 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ miscalibfile_

const std::string ElectronCalibrationUniv::miscalibfile_
private

Definition at line 80 of file ElectronCalibrationUniv.h.

◆ miscalibfileEndCap_

const std::string ElectronCalibrationUniv::miscalibfileEndCap_
private

Definition at line 81 of file ElectronCalibrationUniv.h.

◆ MyHH

HouseholderDecomposition* ElectronCalibrationUniv::MyHH
private

Definition at line 185 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ MyL3Algo1

MinL3Algorithm* ElectronCalibrationUniv::MyL3Algo1
private

Definition at line 116 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ numevent_

const int ElectronCalibrationUniv::numevent_
private

Definition at line 91 of file ElectronCalibrationUniv.h.

◆ phiMax

int ElectronCalibrationUniv::phiMax
private

Definition at line 105 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ phiMin

int ElectronCalibrationUniv::phiMin
private

Definition at line 105 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ PinMinPout

TH1F* ElectronCalibrationUniv::PinMinPout
private

Definition at line 239 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ PinMinPoutNoCuts

TH1F* ElectronCalibrationUniv::PinMinPoutNoCuts
private

Definition at line 240 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ PinOverPout

TH1F* ElectronCalibrationUniv::PinOverPout
private

Definition at line 152 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ PinOverPoutNoCuts

TH1F* ElectronCalibrationUniv::PinOverPoutNoCuts
private

Definition at line 186 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ read_events

int ElectronCalibrationUniv::read_events
private

Definition at line 102 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ rootfile_

const std::string ElectronCalibrationUniv::rootfile_
private

Definition at line 78 of file ElectronCalibrationUniv.h.

Referenced by beginJob().

◆ scE

TH1F* ElectronCalibrationUniv::scE
private

Definition at line 140 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ scENoCuts

TH1F* ElectronCalibrationUniv::scENoCuts
private

Definition at line 168 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ solution

std::vector<float> ElectronCalibrationUniv::solution
private

Definition at line 125 of file ElectronCalibrationUniv.h.

Referenced by endJob().

◆ solutionNoCuts

std::vector<float> ElectronCalibrationUniv::solutionNoCuts
private

Definition at line 126 of file ElectronCalibrationUniv.h.

◆ theCaloTopology_

const CaloTopology* ElectronCalibrationUniv::theCaloTopology_
private

Definition at line 123 of file ElectronCalibrationUniv.h.

Referenced by analyze(), and beginRun().

◆ topologyToken_

const edm::ESGetToken<CaloTopology, CaloTopologyRecord> ElectronCalibrationUniv::topologyToken_
private

Definition at line 122 of file ElectronCalibrationUniv.h.

Referenced by beginRun().

◆ trP

TH1F* ElectronCalibrationUniv::trP
private

Definition at line 141 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ trPNoCuts

TH1F* ElectronCalibrationUniv::trPNoCuts
private

Definition at line 169 of file ElectronCalibrationUniv.h.

Referenced by analyze(), beginJob(), and endJob().

◆ UnivEventIds

std::vector<std::vector<DetId> > ElectronCalibrationUniv::UnivEventIds
private

Definition at line 129 of file ElectronCalibrationUniv.h.

Referenced by analyze(), and endJob().

◆ UnivL3

MinL3AlgoUniv<DetId>* ElectronCalibrationUniv::UnivL3
private

Definition at line 117 of file ElectronCalibrationUniv.h.

Referenced by beginJob(), and endJob().

◆ Univsolution

std::map<DetId, float> ElectronCalibrationUniv::Univsolution
private

Definition at line 130 of file ElectronCalibrationUniv.h.

Referenced by endJob().

◆ WeightVector

std::vector<float> ElectronCalibrationUniv::WeightVector
private

Definition at line 107 of file ElectronCalibrationUniv.h.

◆ WeightVectorNoCuts

std::vector<float> ElectronCalibrationUniv::WeightVectorNoCuts
private

Definition at line 112 of file ElectronCalibrationUniv.h.