CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
hcalCalib Class Reference

#include <hcalCalib.h>

Inheritance diagram for hcalCalib:

Public Member Functions

void Begin (TTree *tree) override
 
void GetCoefFromMtrxInvOfAve ()
 
Int_t GetEntry (Long64_t entry, Int_t getall=0) override
 
TList * GetOutputList () const override
 
 hcalCalib (TTree *=nullptr)
 
void Init (TTree *tree) override
 
void makeTextFile ()
 
Bool_t Notify () override
 
Bool_t Process (Long64_t entry) override
 
Bool_t ReadPhiSymCor ()
 
void SetApplyPhiSymCorFlag (Bool_t b)
 
void SetCalibAbsIEtaMax (Int_t i)
 
void SetCalibAbsIEtaMin (Int_t i)
 
void SetCalibMethod (const TString &s)
 
void SetCalibType (const TString &s)
 
void SetCaloGeometry (const CaloGeometry *g, const HcalTopology *topo)
 
void SetCombinePhiFlag (Bool_t b)
 
void SetConeMaxDist (Float_t d)
 
void SetHbClusterSize (Int_t i)
 
void SetHeClusterSize (Int_t i)
 
void SetHistoFileName (const TString &filename)
 
void SetInputList (TList *input) override
 
void SetMaxEOverP (Float_t e)
 
void SetMaxEtThirdJet (Float_t et)
 
void SetMaxProbeJetEmFrac (Float_t f)
 
void SetMaxTagJetAbsEta (Float_t e)
 
void SetMaxTagJetEmFrac (Float_t f)
 
void SetMaxTargetE (Float_t e)
 
void SetMaxTrkEmE (Float_t e)
 
void SetMinCellE (Float_t e)
 
void SetMinDPhiDiJets (Float_t dphi)
 
void SetMinEOverP (Float_t e)
 
void SetMinProbeJetAbsEta (Float_t e)
 
void SetMinTagJetEt (Float_t e)
 
void SetMinTargetE (Float_t e)
 
void SetObject (TObject *obj) override
 
void SetOption (const char *option) override
 
void SetOutputCorCoefFileName (const TString &filename)
 
void SetPhiSymCorFileName (const TString &filename)
 
void SetSumDepthsFlag (Bool_t b)
 
void SetSumSmallDepthsFlag (Bool_t b)
 
void SetUseConeClustering (Bool_t b)
 
void Terminate () override
 
Int_t Version () const override
 
 ~hcalCalib () override
 

Public Attributes

Bool_t APPLY_PHI_SYM_COR_FLAG
 
TBranch * b_cells
 
TBranch * b_emEnergy
 
TBranch * b_etVetoJet
 
TBranch * b_eventNumber
 
TBranch * b_iEtaHit
 
TBranch * b_iPhiHit
 
TBranch * b_probeJetEmFrac
 
TBranch * b_probeJetP4
 
TBranch * b_runNumber
 
TBranch * b_tagJetEmFrac
 
TBranch * b_tagJetP4
 
TBranch * b_targetE
 
TBranch * b_xTrkEcal
 
TBranch * b_xTrkHcal
 
TBranch * b_yTrkEcal
 
TBranch * b_yTrkHcal
 
TBranch * b_zTrkEcal
 
TBranch * b_zTrkHcal
 
Int_t CALIB_ABS_IETA_MAX
 
Int_t CALIB_ABS_IETA_MIN
 
TString CALIB_METHOD
 
TString CALIB_TYPE
 
std::vector< std::vector< Float_t > > cellEnergies
 
std::vector< std::vector< UInt_t > > cellIds
 
TClonesArray * cells
 
Bool_t COMBINE_PHI
 
Float_t emEnergy
 
Float_t etVetoJet
 
UInt_t eventNumber
 pointer to the analyzed TTree or TChain More...
 
TTree * fChain
 
TH1F * h1_allTrkP
 
TH1F * h1_corResp
 
TH1F * h1_corRespBarrel
 
TH1F * h1_corRespEndcap
 
TH1F * h1_corRespIEta [48]
 
TH1F * h1_numEventsTwrIEta
 
TH1F * h1_rawResp
 
TH1F * h1_rawRespBarrel
 
TH1F * h1_rawRespEndcap
 
TH1F * h1_rawSumE
 
TH1F * h1_selTrkP_iEta10
 
TH1F * h1_trkP
 
TH2F * h2_dHitRefBarrel
 
TH2F * h2_dHitRefEndcap
 
Int_t HB_CLUSTER_SIZE
 
Int_t HE_CLUSTER_SIZE
 
TString HISTO_FILENAME
 
TFile * histoFile
 
std::map< Int_t, Float_t > iEtaCoefMap
 
Int_t iEtaHit
 
UInt_t iPhiHit
 
Float_t MAX_CONE_DIST
 
Float_t MAX_EOVERP
 
Float_t MAX_ET_THIRD_JET
 
Float_t MAX_PROBEJET_EMFRAC
 
Float_t MAX_TAGJET_ABSETA
 
Float_t MAX_TAGJET_EMFRAC
 
Float_t MAX_TARGET_E
 
Float_t MAX_TRK_EME
 
Float_t MIN_CELL_E
 
Float_t MIN_DPHI_DIJETS
 
Float_t MIN_EOVERP
 
Float_t MIN_PROBEJET_ABSETA
 
Float_t MIN_TAGJET_ET
 
Float_t MIN_TARGET_E
 
UInt_t nEvents
 
TString OUTPUT_COR_COEF_FILENAME
 
TString PHI_SYM_COR_FILENAME
 
std::map< UInt_t, Float_t > phiSymCor
 
Float_t probeJetEmFrac
 
TLorentzVector * probeJetP4
 
std::vector< std::pair< Int_t, UInt_t > > refIEtaIPhi
 
UInt_t runNumber
 
std::map< UInt_t, Float_t > solution
 
Bool_t SUM_DEPTHS
 
Bool_t SUM_SMALL_DEPTHS
 
Float_t tagJetEmFrac
 
TLorentzVector * tagJetP4
 
Float_t targetE
 
std::vector< Float_t > targetEnergies
 
const CaloGeometrytheCaloGeometry
 
const HcalTopologytopo_
 
Bool_t USE_CONE_CLUSTERING
 
Float_t xTrkEcal
 
Float_t xTrkHcal
 
Float_t yTrkEcal
 
Float_t yTrkHcal
 
Float_t zTrkEcal
 
Float_t zTrkHcal
 

Detailed Description

Definition at line 46 of file hcalCalib.h.

Constructor & Destructor Documentation

◆ hcalCalib()

hcalCalib::hcalCalib ( TTree *  = nullptr)
inline

Definition at line 121 of file hcalCalib.h.

121 {}

◆ ~hcalCalib()

hcalCalib::~hcalCalib ( )
inlineoverride

Definition at line 122 of file hcalCalib.h.

122 {}

Member Function Documentation

◆ Begin()

void hcalCalib::Begin ( TTree *  tree)
override

Definition at line 28 of file hcalCalib.cc.

References APPLY_PHI_SYM_COR_FLAG, CALIB_TYPE, beamvalidation::exit(), h1_allTrkP, h1_corResp, h1_corRespBarrel, h1_corRespEndcap, h1_corRespIEta, h1_numEventsTwrIEta, h1_rawResp, h1_rawRespBarrel, h1_rawRespEndcap, h1_rawSumE, h1_selTrkP_iEta10, h1_trkP, h2_dHitRefBarrel, h2_dHitRefEndcap, HISTO_FILENAME, histoFile, HltBtagPostValidation_cff::histoName, mps_fire::i, l1tTowerCalibrationProducer_cfi::iEta, nEvents, fileinputsource_cfi::option, and ReadPhiSymCor().

28  {
29  TString option = GetOption();
30 
31  nEvents = 0;
32 
34  edm::LogError("HcalCalib") << "\nERROR: Failed to read the phi symmetry corrections.\n"
35  << "Check if the filename is correct. If the corrections are not needed, set the "
36  "corresponding flag to \"false\"\n"
37  << "\nThe program will be terminated\n";
38 
39  exit(1);
40  }
41 
42  // cellEnergies.reserve(1000000);
43  // cellIds.reserve(1000000);
44  // targetEnergies.reserve(1000000);
45 
46  histoFile = new TFile(HISTO_FILENAME.Data(), "RECREATE");
47 
48  h1_trkP = new TH1F("h1_trkP", "Track momenta; p_{trk} (GeV); Number of tracks", 100, 0, 200);
49  h1_allTrkP = new TH1F("h1_allTrkP", "Track momenta - all tracks; p_{trk} (GeV); Number of tracks", 100, 0, 200);
50 
51  h1_selTrkP_iEta10 = new TH1F(
52  "h1_selTrkP_iEta10", "Track momenta - tracks with |iEta|<10; p_{trk} (GeV); Number of tracks", 100, 0, 200);
53 
54  if (CALIB_TYPE == "ISO_TRACK")
55  h1_rawSumE = new TH1F("h1_rawSumE", "Cluster Energy; E_{cl} (GeV); Number of tracks", 100, 0, 200);
56  else
57  h1_rawSumE = new TH1F("h1_rawSumE", "Cluster Energy; E_{cl} (GeV); Number of tracks", 1000, 0, 2000);
58 
59  h1_rawResp = new TH1F("h1_rawResp", "Uncorrected response: |iEta|<24; E_{had}/p; Number of tracks", 300, 0, 3);
60  h1_corResp = new TH1F("h1_corResp", "Corrected response: |iEta|<24; E_{had}/p; Number of tracks", 300, 0, 3);
61 
63  new TH1F("h1_rawRespBarrel", "Uncorrected response: |iEta|<15; E_{had}/p; Number of tracks", 300, 0, 3);
65  new TH1F("h1_corRespBarrel", "Corrected response: |iEta|<15; E_{had}/p; Number of tracks", 300, 0, 3);
66 
68  new TH1F("h1_rawRespEndcap", "Uncorrected response: 17<|iEta|<24; E_{had}/p; Number of tracks", 300, 0, 3);
70  new TH1F("h1_corRespEndcap", "Corrected response: 17<|iEta|<24; E_{had}/p; Number of tracks", 300, 0, 3);
71 
72  h1_numEventsTwrIEta = new TH1F("h1_numEventsTwrIEta", "h1_numEventsTwrIEta", 80, -40, 40);
73 
74  h2_dHitRefBarrel = new TH2F("h2_dHitRefBarrel",
75  "{#Delta}i{#phi} vs {#Delta}i{#eta} of hit and most energetic "
76  "tower(|i{#eta}|<16);{#Delta}i{#eta}; {#Delta}i{#phi}",
77  10,
78  -5,
79  5,
80  10,
81  -5,
82  5);
83  h2_dHitRefEndcap = new TH2F("h2_dHitRefEndcap",
84  "{#Delta}i{#phi} vs {#Delta}i{#eta} of hit and most energetic tower (16<|i{#eta}|<25) "
85  ";{#Delta}i{#eta}; {#Delta}i{#phi}",
86  10,
87  -5,
88  5,
89  10,
90  -5,
91  5);
92 
93  TString histoName = "isoTrack_";
94 
95  for (Int_t i = 0; i < 48; ++i) {
96  Long_t iEta;
97  if (i < 24)
98  iEta = i - 24;
99  else
100  iEta = i - 23;
101  TString hn = histoName + iEta;
102  h1_corRespIEta[i] = new TH1F(hn, hn, 300, 0, 3.0);
103  }
104 
105 } // end of Begin()
TH1F * h1_corRespBarrel
Definition: hcalCalib.h:109
TH1F * h1_trkP
Definition: hcalCalib.h:100
TString CALIB_TYPE
Definition: hcalCalib.h:171
TFile * histoFile
Definition: hcalCalib.h:97
Log< level::Error, false > LogError
UInt_t nEvents
Definition: hcalCalib.h:95
TH1F * h1_rawSumE
Definition: hcalCalib.h:105
TH1F * h1_corRespEndcap
Definition: hcalCalib.h:111
TH2F * h2_dHitRefEndcap
Definition: hcalCalib.h:115
TH1F * h1_rawResp
Definition: hcalCalib.h:106
TH1F * h1_corResp
Definition: hcalCalib.h:107
Bool_t APPLY_PHI_SYM_COR_FLAG
Definition: hcalCalib.h:175
TH1F * h1_rawRespBarrel
Definition: hcalCalib.h:108
TH1F * h1_corRespIEta[48]
Definition: hcalCalib.h:119
TH1F * h1_numEventsTwrIEta
Definition: hcalCalib.h:112
TH1F * h1_rawRespEndcap
Definition: hcalCalib.h:110
Bool_t ReadPhiSymCor()
Definition: hcalCalib.cc:559
TString HISTO_FILENAME
Definition: hcalCalib.h:178
TH1F * h1_allTrkP
Definition: hcalCalib.h:101
TH1F * h1_selTrkP_iEta10
Definition: hcalCalib.h:103
TH2F * h2_dHitRefBarrel
Definition: hcalCalib.h:114
def exit(msg="")

◆ GetCoefFromMtrxInvOfAve()

void hcalCalib::GetCoefFromMtrxInvOfAve ( )

Definition at line 471 of file hcalCalib.cc.

References A, funct::abs(), b, CALIB_ABS_IETA_MAX, CALIB_ABS_IETA_MIN, CALIB_METHOD, cellEnergies, cellIds, mps_fire::end, spr::find(), mps_fire::i, l1tTowerCalibrationProducer_cfi::iEta, HcalDetId::ieta(), iEtaCoefMap, dqmiolumiharvest::j, refIEtaIPhi, findQualityFiles::size, solution, targetEnergies, and x.

Referenced by Terminate().

471  {
472  // these maps are keyed by iEta
473  std::map<Int_t, Float_t> aveTargetE;
474  std::map<Int_t, Int_t> nEntries; // count hits
475 
476  // iEtaRef iEtaCell, energy
477  std::map<Int_t, std::map<Int_t, Float_t> > aveHitE; // add energies in the loop, normalize after that
478 
479  for (unsigned int i = 0; i < cellEnergies.size(); ++i) {
480  Int_t iEtaRef = refIEtaIPhi[i].first;
481  aveTargetE[iEtaRef] += targetEnergies[i];
482  nEntries[iEtaRef]++;
483 
484  // for hybrid method: matrix inv of averages preceeded by L3
485  if (CALIB_METHOD == "L3_AND_MTRX_INV") {
486  for (unsigned int j = 0; j < (cellEnergies[i]).size(); ++j) {
487  aveHitE[iEtaRef][HcalDetId(cellIds[i][j]).ieta()] += (solution[cellIds[i][j]] * cellEnergies[i][j]);
488  }
489  } else if (CALIB_METHOD == "MATRIX_INV_OF_ETA_AVE") {
490  for (unsigned int j = 0; j < (cellEnergies[i]).size(); ++j) {
491  aveHitE[iEtaRef][HcalDetId(cellIds[i][j]).ieta()] += cellEnergies[i][j];
492  }
493  }
494 
495  } // end of loop of entries
496 
497  // scale by number of entries to get the averages
498  Float_t norm = 1.0;
499  for (std::map<Int_t, Float_t>::iterator m_it = aveTargetE.begin(); m_it != aveTargetE.end(); ++m_it) {
500  Int_t iEta = m_it->first;
501  norm = (nEntries[iEta] > 0) ? 1.0 / (nEntries[iEta]) : 1.0;
502  aveTargetE[iEta] *= norm;
503 
504  std::map<Int_t, Float_t>::iterator n_it = (aveHitE[iEta]).begin();
505 
506  Float_t sumRawE = 0;
507  for (; n_it != (aveHitE[iEta]).end(); ++n_it) {
508  (n_it->second) *= norm;
509  sumRawE += (n_it->second);
510  }
511 
512  } // end of scaling by number of entries
513 
514  Int_t ONE_SIDE_IETA_RANGE = CALIB_ABS_IETA_MAX - CALIB_ABS_IETA_MIN + 1;
515 
516  // conversion from iEta to index for the linear system
517  // contains elements only in the valid range for *matrix inversion*
518  std::vector<Int_t> iEtaList;
519 
520  for (Int_t i = -CALIB_ABS_IETA_MAX; i <= CALIB_ABS_IETA_MAX; ++i) {
521  if (abs(i) < CALIB_ABS_IETA_MIN)
522  continue;
523  iEtaList.push_back(i);
524  }
525 
526  TMatrixD A(2 * ONE_SIDE_IETA_RANGE, 2 * ONE_SIDE_IETA_RANGE);
527  TMatrixD b(2 * ONE_SIDE_IETA_RANGE, 1);
528  TMatrixD x(2 * ONE_SIDE_IETA_RANGE, 1);
529 
530  for (Int_t i = 0; i < 2 * ONE_SIDE_IETA_RANGE; ++i) {
531  for (Int_t j = 0; j < 2 * ONE_SIDE_IETA_RANGE; ++j) {
532  A(i, j) = 0.0;
533  }
534  }
535 
536  for (UInt_t i = 0; i < iEtaList.size(); ++i) {
537  b(i, 0) = aveTargetE[iEtaList[i]];
538 
539  std::map<Int_t, Float_t>::iterator n_it = aveHitE[iEtaList[i]].begin();
540  for (; n_it != aveHitE[iEtaList[i]].end(); ++n_it) {
541  if (fabs(n_it->first) > CALIB_ABS_IETA_MAX || fabs(n_it->first) < CALIB_ABS_IETA_MIN)
542  continue;
543  Int_t j = Int_t(find(iEtaList.begin(), iEtaList.end(), n_it->first) - iEtaList.begin());
544  A(i, j) = n_it->second;
545  }
546  }
547 
548  TMatrixD coef = b;
549  TDecompQRH qrh(A);
550  Bool_t hasSolution = qrh.MultiSolve(coef);
551 
552  if (hasSolution && (CALIB_METHOD == "L3_AND_MTRX_INV" || CALIB_METHOD == "MATRIX_INV_OF_ETA_AVE")) {
553  for (UInt_t i = 0; i < iEtaList.size(); ++i) {
554  iEtaCoefMap[iEtaList[i]] = coef(i, 0);
555  }
556  }
557 }
std::vector< std::pair< Int_t, UInt_t > > refIEtaIPhi
Definition: hcalCalib.h:228
size
Write out results.
std::vector< Float_t > targetEnergies
Definition: hcalCalib.h:229
std::map< Int_t, Float_t > iEtaCoefMap
Definition: hcalCalib.h:235
std::vector< std::vector< UInt_t > > cellIds
Definition: hcalCalib.h:227
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Int_t CALIB_ABS_IETA_MIN
Definition: hcalCalib.h:162
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::map< UInt_t, Float_t > solution
Definition: hcalCalib.h:233
std::vector< std::vector< Float_t > > cellEnergies
Definition: hcalCalib.h:226
TString CALIB_METHOD
Definition: hcalCalib.h:172
double b
Definition: hdecay.h:118
Int_t CALIB_ABS_IETA_MAX
Definition: hcalCalib.h:161
Definition: APVGainStruct.h:7

◆ GetEntry()

Int_t hcalCalib::GetEntry ( Long64_t  entry,
Int_t  getall = 0 
)
inlineoverride

Definition at line 129 of file hcalCalib.h.

References mps_splice::entry, and fChain.

Referenced by Process().

129  {
130  return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0;
131  }
TTree * fChain
Definition: hcalCalib.h:48

◆ GetOutputList()

TList* hcalCalib::GetOutputList ( ) const
inlineoverride

Definition at line 135 of file hcalCalib.h.

135 { return fOutput; }

◆ Init()

void hcalCalib::Init ( TTree *  tree)
inlineoverride

Definition at line 697 of file hcalCalib.cc.

References b_cells, b_emEnergy, b_etVetoJet, b_eventNumber, b_iEtaHit, b_iPhiHit, b_probeJetEmFrac, b_probeJetP4, b_runNumber, b_tagJetEmFrac, b_tagJetP4, b_targetE, b_xTrkEcal, b_xTrkHcal, b_yTrkEcal, b_yTrkHcal, b_zTrkEcal, b_zTrkHcal, cells, emEnergy, etVetoJet, eventNumber, fChain, iEtaHit, iPhiHit, probeJetEmFrac, probeJetP4, runNumber, tagJetEmFrac, tagJetP4, targetE, MainPageGenerator::tree, xTrkEcal, xTrkHcal, yTrkEcal, yTrkHcal, zTrkEcal, and zTrkHcal.

697  {
698  // The Init() function is called when the selector needs to initialize
699  // a new tree or chain. Typically here the branch addresses and branch
700  // pointers of the tree will be set.
701  // It is normaly not necessary to make changes to the generated
702  // code, but the routine can be extended by the user if needed.
703  // Init() will be called many times when running on PROOF
704  // (once per file to be processed).
705 
706  // Set object pointer
707  cells = nullptr;
708  tagJetP4 = nullptr;
709  probeJetP4 = nullptr;
710 
711  // Set branch addresses and branch pointers
712  if (!tree)
713  return;
714  fChain = tree;
715 
716  // fChain->SetMakeClass(1);
717 
718  fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber);
719  fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber);
720  fChain->SetBranchAddress("iEtaHit", &iEtaHit, &b_iEtaHit);
721  fChain->SetBranchAddress("iPhiHit", &iPhiHit, &b_iPhiHit);
722  fChain->SetBranchAddress("cells", &cells, &b_cells);
723  fChain->SetBranchAddress("emEnergy", &emEnergy, &b_emEnergy);
724  fChain->SetBranchAddress("targetE", &targetE, &b_targetE);
725  fChain->SetBranchAddress("etVetoJet", &etVetoJet, &b_etVetoJet);
726 
727  fChain->SetBranchAddress("xTrkHcal", &xTrkHcal, &b_xTrkHcal);
728  fChain->SetBranchAddress("yTrkHcal", &yTrkHcal, &b_yTrkHcal);
729  fChain->SetBranchAddress("zTrkHcal", &zTrkHcal, &b_zTrkHcal);
730  fChain->SetBranchAddress("xTrkEcal", &xTrkEcal, &b_xTrkEcal);
731  fChain->SetBranchAddress("yTrkEcal", &yTrkEcal, &b_yTrkEcal);
732  fChain->SetBranchAddress("zTrkEcal", &zTrkEcal, &b_zTrkEcal);
733 
734  fChain->SetBranchAddress("tagJetEmFrac", &tagJetEmFrac, &b_tagJetEmFrac);
735  fChain->SetBranchAddress("probeJetEmFrac", &probeJetEmFrac, &b_probeJetEmFrac);
736 
737  fChain->SetBranchAddress("tagJetP4", &tagJetP4, &b_tagJetP4);
738  fChain->SetBranchAddress("probeJetP4", &probeJetP4, &b_probeJetP4);
739 }
TBranch * b_iEtaHit
Definition: hcalCalib.h:75
TTree * fChain
Definition: hcalCalib.h:48
UInt_t eventNumber
pointer to the analyzed TTree or TChain
Definition: hcalCalib.h:50
TBranch * b_etVetoJet
Definition: hcalCalib.h:80
TBranch * b_yTrkEcal
Definition: hcalCalib.h:86
TBranch * b_probeJetEmFrac
Definition: hcalCalib.h:90
TBranch * b_iPhiHit
Definition: hcalCalib.h:76
Float_t xTrkHcal
Definition: hcalCalib.h:59
TLorentzVector * tagJetP4
Definition: hcalCalib.h:66
Float_t tagJetEmFrac
Definition: hcalCalib.h:69
Float_t zTrkHcal
Definition: hcalCalib.h:61
Float_t xTrkEcal
Definition: hcalCalib.h:62
Float_t targetE
Definition: hcalCalib.h:56
TLorentzVector * probeJetP4
Definition: hcalCalib.h:67
Float_t yTrkEcal
Definition: hcalCalib.h:63
TBranch * b_zTrkHcal
Definition: hcalCalib.h:84
TBranch * b_tagJetP4
Definition: hcalCalib.h:92
TBranch * b_runNumber
Definition: hcalCalib.h:74
Int_t iEtaHit
Definition: hcalCalib.h:52
TBranch * b_zTrkEcal
Definition: hcalCalib.h:87
TBranch * b_eventNumber
Definition: hcalCalib.h:73
Float_t zTrkEcal
Definition: hcalCalib.h:64
TBranch * b_tagJetEmFrac
Definition: hcalCalib.h:89
Float_t emEnergy
Definition: hcalCalib.h:55
TBranch * b_cells
Definition: hcalCalib.h:77
UInt_t iPhiHit
Definition: hcalCalib.h:53
TBranch * b_yTrkHcal
Definition: hcalCalib.h:83
Float_t etVetoJet
Definition: hcalCalib.h:57
TBranch * b_emEnergy
Definition: hcalCalib.h:78
TBranch * b_xTrkEcal
Definition: hcalCalib.h:85
TClonesArray * cells
Definition: hcalCalib.h:54
Definition: tree.py:1
UInt_t runNumber
Definition: hcalCalib.h:51
TBranch * b_xTrkHcal
Definition: hcalCalib.h:82
TBranch * b_targetE
Definition: hcalCalib.h:79
Float_t yTrkHcal
Definition: hcalCalib.h:60
Float_t probeJetEmFrac
Definition: hcalCalib.h:70
TBranch * b_probeJetP4
Definition: hcalCalib.h:93

◆ makeTextFile()

void hcalCalib::makeTextFile ( )

Definition at line 622 of file hcalCalib.cc.

References funct::abs(), CALIB_ABS_IETA_MAX, CALIB_ABS_IETA_MIN, CALIB_METHOD, COMBINE_PHI, ztail::d, MillePedeFileConverter_cfg::e, PVValHelper::eta, HcalEndcap, HcalOuter, l1ctLayer2EG_cff::id, iEtaCoefMap, OUTPUT_COR_COEF_FILENAME, phi, heavyFlavorDQMFirstStep_cff::sdName, solution, SUM_DEPTHS, topo_, and HcalTopology::valid().

Referenced by Terminate().

622  {
623  //{ HcalEmpty=0, HcalBarrel=1, HcalEndcap=2, HcalOuter=3, HcalForward=4, HcalTriggerTower=5, HcalOther=7 };
624 
625  TString sdName[8] = {"EMPTY", "HB", "HE", "HO", "HF", "TRITWR", "UNDEF", "OTHER"};
626 
627  FILE* constFile = fopen(OUTPUT_COR_COEF_FILENAME.Data(), "w+");
628 
629  // header of the constants file
630  fprintf(constFile, "%1s%16s%16s%16s%16s%9s%11s\n", "#", "eta", "phi", "depth", "det", "value", "DetId");
631 
632  // Order loops to produce sequence of constants as for phi symmetry
633 
634  for (Int_t sd = 1; sd <= 4; sd++) {
635  for (Int_t e = 1; e <= 50; e++) {
636  Int_t eta;
637 
638  for (Int_t side = 0; side < 2; side++) {
639  eta = (side == 0) ? -e : e; //ta *= (-1);
640 
641  for (Int_t phi = 1; phi <= 72; phi++) {
642  for (Int_t d = 1; d < 5; d++) {
643  if (!topo_->valid(HcalDetId(HcalSubdetector(sd), eta, phi, d)))
644  continue;
646  Float_t corrFactor = 1.0;
647 
649  // if (abs(eta)>=CALIB_ABS_IETA_MIN && abs(eta)<=22 && HcalSubdetector(sd)!=HcalOuter) {
650 
651  // need some care when depths were summed for iEta=16 =>
652  // the coeficients are saved in depth 1 of HB: affects
653  Int_t subdetInd = sd;
654 
655  if (abs(eta) == 16 && HcalSubdetector(sd) == HcalEndcap && SUM_DEPTHS) {
656  subdetInd = 1;
657  }
658 
659  if (CALIB_METHOD == "L3" || CALIB_METHOD == "L3_AND_MTRX_INV") {
660  if (SUM_DEPTHS && COMBINE_PHI)
661  corrFactor = solution[HcalDetId(HcalSubdetector(subdetInd), eta, 1, 1)];
662  else if (SUM_DEPTHS)
663  corrFactor = solution[HcalDetId(HcalSubdetector(subdetInd), eta, phi, 1)];
664  else if (COMBINE_PHI)
665  corrFactor = solution[HcalDetId(HcalSubdetector(sd), eta, 1, d)];
666  else
667  corrFactor = solution[HcalDetId(HcalSubdetector(sd), eta, phi, d)];
668 
669  // Remark: a new case was added (sumSmallDepths) where the first two depths in towers 15,16
670  // are summed and stored in depth 1.
671  // For now we create the correction coef for depth 2 (set equal to depth 1)
672  // after the call to the L3 minimizer so that this case is also handled without modifying the
673  // logic above. Probably it is better to move it here?
674 
675  } // L3
676 
677  else if (CALIB_METHOD == "MATRIX_INV_OF_ETA_AVE") {
678  corrFactor = iEtaCoefMap[eta];
679  }
680 
681  else if (CALIB_METHOD == "ISO_TRK_PHI_SYM") {
682  corrFactor = solution[HcalDetId(HcalSubdetector(sd), eta, phi, d)];
683  }
684 
685  } // if within the calibration range
686 
687  fprintf(constFile, "%17i%16i%16i%16s%9.5f%11X\n", eta, phi, d, sdName[sd].Data(), corrFactor, id.rawId());
688  }
689  }
690  }
691  }
692  }
693 
694  return;
695 }
std::map< Int_t, Float_t > iEtaCoefMap
Definition: hcalCalib.h:235
bool valid(const DetId &id) const override
Bool_t SUM_DEPTHS
Definition: hcalCalib.h:151
Int_t CALIB_ABS_IETA_MIN
Definition: hcalCalib.h:162
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HcalTopology * topo_
Definition: hcalCalib.h:181
std::map< UInt_t, Float_t > solution
Definition: hcalCalib.h:233
d
Definition: ztail.py:151
Bool_t COMBINE_PHI
Definition: hcalCalib.h:153
TString CALIB_METHOD
Definition: hcalCalib.h:172
TString OUTPUT_COR_COEF_FILENAME
Definition: hcalCalib.h:177
Int_t CALIB_ABS_IETA_MAX
Definition: hcalCalib.h:161

◆ Notify()

Bool_t hcalCalib::Notify ( )
inlineoverride

Definition at line 741 of file hcalCalib.cc.

741  {
742  // The Notify() function is called when a new file is opened. This
743  // can be either for a new TTree in a TChain or when when a new TTree
744  // is started when using PROOF. It is normaly not necessary to make changes
745  // to the generated code, but the routine can be extended by the
746  // user if needed. The return value is currently not used.
747 
748  return kTRUE;
749 }

◆ Process()

Bool_t hcalCalib::Process ( Long64_t  entry)
override

Definition at line 111 of file hcalCalib.cc.

References funct::abs(), APPLY_PHI_SYM_COR_FLAG, CALIB_TYPE, cellEnergies, cellIds, cells, COMBINE_PHI, combinePhi(), TCell::e(), emEnergy, mps_splice::entry, etVetoJet, filterCells3x3(), filterCells5x5(), filterCellsInCone(), GetEntry(), getIEtaIPhiForHighestE(), h1_allTrkP, h1_rawSumE, h1_selTrkP_iEta10, h2_dHitRefBarrel, h2_dHitRefEndcap, HB_CLUSTER_SIZE, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HE_CLUSTER_SIZE, mps_fire::i, TCell::id(), iEtaHit, iPhiHit, M_PI, MAX_CONE_DIST, MAX_EOVERP, MAX_ET_THIRD_JET, MAX_PROBEJET_EMFRAC, MAX_TAGJET_ABSETA, MAX_TARGET_E, MAX_TRK_EME, MIN_CELL_E, MIN_DPHI_DIJETS, MIN_EOVERP, MIN_PROBEJET_ABSETA, MIN_TAGJET_ET, nEvents, phiSymCor, probeJetEmFrac, probeJetP4, refIEtaIPhi, edm::second(), TCell::SetE(), SUM_DEPTHS, SUM_SMALL_DEPTHS, sumDepths(), sumSmallDepths(), tagJetP4, targetE, targetEnergies, theCaloGeometry, USE_CONE_CLUSTERING, xTrkHcal, yTrkHcal, and zTrkHcal.

111  {
112  // fChain->GetTree()->GetEntry(entry);
113  GetEntry(entry);
114 
115  std::set<UInt_t> uniqueIds; // for testing: check if there are duplicate cells (AA)
116 
117  Bool_t acceptEvent = kTRUE;
118 
119  ++nEvents;
120 
121  if (!(nEvents % 100000))
122  edm::LogVerbatim("HcalCalib") << "event: " << nEvents;
123 
124  h1_allTrkP->Fill(targetE);
125 
126  if (targetE < MIN_TARGET_E || targetE > MAX_TARGET_E)
127  return kFALSE;
128  ;
129 
130  // make local copy as the cells may be modified due to phi/depth sum, phi corrections etc
131  std::vector<TCell> selectCells;
132 
133  if (cells->GetSize() == 0)
134  return kFALSE;
135 
136  if (CALIB_TYPE == "DI_JET" && probeJetEmFrac > 0.999)
137  return kTRUE;
138 
139  for (Int_t i = 0; i < cells->GetSize(); ++i) {
140  TCell* thisCell = (TCell*)cells->At(i);
141 
142  if (HcalDetId(thisCell->id()).subdet() == HcalOuter)
143  continue; // reject HO, make a switch!
144 
145  if (HcalDetId(thisCell->id()).subdet() != HcalBarrel && HcalDetId(thisCell->id()).subdet() != HcalEndcap &&
146  HcalDetId(thisCell->id()).subdet() != HcalForward) {
147  edm::LogWarning("HcalCalib") << "Unknown or wrong hcal subdetector: " << HcalDetId(thisCell->id()).subdet();
148  }
149 
150  // Apply phi symmetry corrections if the flag is set
152  thisCell->SetE(phiSymCor[thisCell->id()] * thisCell->e());
153 
154  if (thisCell->e() > MIN_CELL_E)
155  selectCells.push_back(*thisCell);
156  }
157 
158  if (selectCells.empty()) {
159  edm::LogWarning("HcalCalib") << "NO CELLS ABOVE THRESHOLD FOUND FOR TARGET!!!";
160  }
161 
162  if (SUM_DEPTHS)
163  sumDepths(selectCells);
164  else if (SUM_SMALL_DEPTHS)
165  sumSmallDepths(selectCells); // depth 1,2 in twrs 15,16
166 
167  // most energetic tower (IsoTracks) or centroid of probe jet (DiJets)
168  std::pair<Int_t, UInt_t> refPos;
169 
170  Int_t dEtaHitRef = 999;
171  Int_t dPhiHitRef = 999;
172 
173  if (CALIB_TYPE == "ISO_TRACK") {
174  Int_t iEtaMaxE; // filled by reference in getIEtaIPhiForHighestE
175  UInt_t iPhiMaxE; //
176 
177  getIEtaIPhiForHighestE(selectCells, iEtaMaxE, iPhiMaxE);
178 
179  dEtaHitRef = iEtaMaxE - iEtaHit;
180  dPhiHitRef = iPhiMaxE - iPhiHit;
181 
182  if (dPhiHitRef < -36)
183  dPhiHitRef += 72;
184  if (dPhiHitRef > 36)
185  dPhiHitRef -= 72;
186 
187  if (iEtaHit * iEtaMaxE < 0) {
188  if (dEtaHitRef < 0)
189  dEtaHitRef += 1;
190  if (dEtaHitRef > 0)
191  dEtaHitRef -= 1;
192  }
193 
194  if (abs(iEtaHit) < 16)
195  h2_dHitRefBarrel->Fill(dEtaHitRef, dPhiHitRef);
196  if (abs(iEtaHit) > 16 && abs(iEtaHit) < 25)
197  h2_dHitRefEndcap->Fill(dEtaHitRef, dPhiHitRef);
198 
199  // --------------------------------------------------
200  // Choice of cluster definition
201  //
202  // fixed size NxN clusters as specified in to config file
203  if (!USE_CONE_CLUSTERING) {
204  if (abs(iEtaMaxE) < 16 && HB_CLUSTER_SIZE == 3)
205  filterCells3x3(selectCells, iEtaMaxE, iPhiMaxE);
206  if (abs(iEtaMaxE) > 15 && HE_CLUSTER_SIZE == 3)
207  filterCells3x3(selectCells, iEtaMaxE, iPhiMaxE);
208 
209  if (abs(iEtaMaxE) < 16 && HB_CLUSTER_SIZE == 5)
210  filterCells5x5(selectCells, iEtaMaxE, iPhiMaxE);
211  if (abs(iEtaMaxE) > 15 && HE_CLUSTER_SIZE == 5)
212  filterCells5x5(selectCells, iEtaMaxE, iPhiMaxE);
213  } else {
214  // calculate distance at hcal surface
215  const GlobalPoint hitPositionHcal(xTrkHcal, yTrkHcal, zTrkHcal);
216  filterCellsInCone(selectCells, hitPositionHcal, MAX_CONE_DIST, theCaloGeometry);
217  }
218 
219  refPos.first = iEtaMaxE;
220  refPos.second = iPhiMaxE;
221 
222  } else if (CALIB_TYPE == "DI_JET") { // Apply selection cuts on DiJet events here
223 
225  acceptEvent = kFALSE;
226 
227  Float_t jetsDPhi = probeJetP4->DeltaPhi(*tagJetP4);
228  if (fabs(jetsDPhi * 180.0 / M_PI) < MIN_DPHI_DIJETS)
229  acceptEvent = kFALSE;
230 
232  acceptEvent = kFALSE;
233  if (fabs(probeJetP4->Eta()) < MIN_PROBEJET_ABSETA)
234  acceptEvent = kFALSE;
235  if (fabs(tagJetP4->Eta()) > MAX_TAGJET_ABSETA)
236  acceptEvent = kFALSE;
237  if (fabs(tagJetP4->Et()) < MIN_TAGJET_ET)
238  acceptEvent = kFALSE;
239 
240  if (acceptEvent) {
241  Int_t iEtaMaxE; // filled by reference in getIEtaIPhiForHighestE
242  UInt_t iPhiMaxE; //
243 
244  getIEtaIPhiForHighestE(selectCells, iEtaMaxE, iPhiMaxE);
245 
246  // The ref position for the jet is not used in the minimization at this time.
247  // It will be needed if we attempt to do matrix inversion: then the question is
248  // which value is better suited: the centroid of the jet or the hottest tower...
249 
250  // refPos.first = iEtaHit;
251  // refPos.second = iPhiHit;
252 
253  refPos.first = iEtaMaxE;
254  refPos.second = iPhiMaxE;
255 
256  if (abs(iEtaMaxE) > 40)
257  acceptEvent = kFALSE; // for testing : set as parameter (AA)
258  }
259  }
260 
261  if (COMBINE_PHI)
262  combinePhi(selectCells);
263 
264  // fill the containers for the minimization prcedures
265  std::vector<Float_t> energies;
266  std::vector<UInt_t> ids;
267 
268  for (std::vector<TCell>::iterator i_it = selectCells.begin(); i_it != selectCells.end(); ++i_it) {
269  // for testing : fill only unique id's
270 
271  if (uniqueIds.insert(i_it->id()).second) {
272  energies.push_back(i_it->e());
273  ids.push_back(i_it->id());
274  }
275  }
276 
277  if (CALIB_TYPE == "ISO_TRACK") {
278  if (accumulate(energies.begin(), energies.end(), 0.0) / targetE < MIN_EOVERP)
279  acceptEvent = kFALSE;
280  if (accumulate(energies.begin(), energies.end(), 0.0) / targetE > MAX_EOVERP)
281  acceptEvent = kFALSE;
282 
283  if (emEnergy > MAX_TRK_EME)
284  acceptEvent = kFALSE;
285 
286  if (abs(dEtaHitRef) > 1 || abs(dPhiHitRef) > 1)
287  acceptEvent = kFALSE;
288 
289  // Have to check if for |iEta|>20 (and neighboring region) the dPhiHitRef
290  // should be relaxed to 2. The neighboring towers have dPhi=2...
291  }
292 
293  h1_rawSumE->Fill(accumulate(energies.begin(), energies.end(), 0.0));
294 
295  // here we fill the information for the minimization procedure
296  if (acceptEvent) {
297  cellEnergies.push_back(energies);
298  cellIds.push_back(ids);
299  targetEnergies.push_back(targetE);
300  refIEtaIPhi.push_back(refPos);
301 
302  if (abs(refPos.first) <= 10)
303  h1_selTrkP_iEta10->Fill(targetE);
304  }
305 
306  // Clean up
307  energies.clear();
308  ids.clear();
309  selectCells.clear();
310 
311  return kTRUE;
312 }
void filterCellsInCone(std::vector< TCell > &selectCells, const GlobalPoint hitPositionHcal, Float_t maxConeDist, const CaloGeometry *theCaloGeometry)
std::vector< std::pair< Int_t, UInt_t > > refIEtaIPhi
Definition: hcalCalib.h:228
Log< level::Info, true > LogVerbatim
std::vector< Float_t > targetEnergies
Definition: hcalCalib.h:229
Float_t MAX_TARGET_E
Definition: hcalCalib.h:141
std::vector< std::vector< UInt_t > > cellIds
Definition: hcalCalib.h:227
Float_t xTrkHcal
Definition: hcalCalib.h:59
TString CALIB_TYPE
Definition: hcalCalib.h:171
TLorentzVector * tagJetP4
Definition: hcalCalib.h:66
Float_t zTrkHcal
Definition: hcalCalib.h:61
std::map< UInt_t, Float_t > phiSymCor
Definition: hcalCalib.h:231
Float_t e()
Definition: TCell.h:31
Float_t MAX_EOVERP
Definition: hcalCalib.h:145
Float_t targetE
Definition: hcalCalib.h:56
Bool_t SUM_DEPTHS
Definition: hcalCalib.h:151
Definition: TCell.h:15
Float_t MIN_CELL_E
Definition: hcalCalib.h:143
TLorentzVector * probeJetP4
Definition: hcalCalib.h:67
UInt_t nEvents
Definition: hcalCalib.h:95
TH1F * h1_rawSumE
Definition: hcalCalib.h:105
U second(std::pair< T, U > const &p)
void combinePhi(std::vector< TCell > &selectCells)
TH2F * h2_dHitRefEndcap
Definition: hcalCalib.h:115
Int_t HE_CLUSTER_SIZE
Definition: hcalCalib.h:156
UInt_t id()
Definition: TCell.h:32
Int_t iEtaHit
Definition: hcalCalib.h:52
Float_t MAX_TRK_EME
Definition: hcalCalib.h:146
Float_t MIN_DPHI_DIJETS
Definition: hcalCalib.h:149
Int_t HB_CLUSTER_SIZE
Definition: hcalCalib.h:155
Float_t MIN_TAGJET_ET
Definition: hcalCalib.h:167
Bool_t APPLY_PHI_SYM_COR_FLAG
Definition: hcalCalib.h:175
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Float_t emEnergy
Definition: hcalCalib.h:55
std::vector< std::vector< Float_t > > cellEnergies
Definition: hcalCalib.h:226
Float_t MIN_EOVERP
Definition: hcalCalib.h:144
void SetE(Float_t e)
Definition: TCell.h:34
void filterCells3x3(std::vector< TCell > &selectCells, Int_t iEta, UInt_t iPhi)
Float_t MIN_PROBEJET_ABSETA
Definition: hcalCalib.h:169
#define M_PI
Bool_t COMBINE_PHI
Definition: hcalCalib.h:153
Float_t MAX_ET_THIRD_JET
Definition: hcalCalib.h:148
UInt_t iPhiHit
Definition: hcalCalib.h:53
Bool_t USE_CONE_CLUSTERING
Definition: hcalCalib.h:158
void sumSmallDepths(std::vector< TCell > &selectCells)
Float_t etVetoJet
Definition: hcalCalib.h:57
TClonesArray * cells
Definition: hcalCalib.h:54
void filterCells5x5(std::vector< TCell > &selectCells, Int_t iEta, UInt_t iPhi)
Bool_t SUM_SMALL_DEPTHS
Definition: hcalCalib.h:152
Int_t GetEntry(Long64_t entry, Int_t getall=0) override
Definition: hcalCalib.h:129
TH1F * h1_allTrkP
Definition: hcalCalib.h:101
Float_t MAX_TAGJET_ABSETA
Definition: hcalCalib.h:166
Float_t MAX_PROBEJET_EMFRAC
Definition: hcalCalib.h:164
const CaloGeometry * theCaloGeometry
Definition: hcalCalib.h:180
void sumDepths(std::vector< TCell > &selectCells)
Log< level::Warning, false > LogWarning
void getIEtaIPhiForHighestE(std::vector< TCell > &selectCells, Int_t &iEta, UInt_t &iPhi)
Float_t MAX_CONE_DIST
Definition: hcalCalib.h:159
Float_t yTrkHcal
Definition: hcalCalib.h:60
Float_t probeJetEmFrac
Definition: hcalCalib.h:70
TH1F * h1_selTrkP_iEta10
Definition: hcalCalib.h:103
TH2F * h2_dHitRefBarrel
Definition: hcalCalib.h:114

◆ ReadPhiSymCor()

Bool_t hcalCalib::ReadPhiSymCor ( )

Definition at line 559 of file hcalCalib.cc.

References LEDCalibrationChannels::depth, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, l1tTowerCalibrationProducer_cfi::iEta, mps_splice::line, PHI_SYM_COR_FILENAME, phiSymCor, heavyFlavorDQMFirstStep_cff::sdName, AlCaHLTBitMon_QueryRunRegistry::string, topo_, HcalTopology::valid(), and relativeConstraints::value.

Referenced by Begin().

559  {
560  std::ifstream phiSymFile(PHI_SYM_COR_FILENAME.Data());
561 
562  if (!phiSymFile) {
563  edm::LogWarning("HcalCalib") << "\nERROR: Can not find file with phi symmetry constants \""
564  << PHI_SYM_COR_FILENAME.Data() << "\"";
565  return kFALSE;
566  }
567 
568  // assumes the format used in CSA08, first line is a comment
569 
570  Int_t iEta;
571  UInt_t iPhi;
572  UInt_t depth;
573  TString sdName;
574  UInt_t detId;
575 
576  Float_t value;
577  HcalSubdetector sd;
578 
580 
581  while (getline(phiSymFile, line)) {
582  if (line.empty() || line[0] == '#')
583  continue;
584 
585  std::istringstream linestream(line);
586  linestream >> iEta >> iPhi >> depth >> sdName >> value >> std::hex >> detId;
587 
588  if (sdName == "HB")
589  sd = HcalBarrel;
590  else if (sdName == "HE")
591  sd = HcalEndcap;
592  else if (sdName == "HO")
593  sd = HcalOuter;
594  else if (sdName == "HF")
595  sd = HcalForward;
596  else {
597  edm::LogWarning("HcalCalib") << "\nInvalid detector name in phi symmetry constants file: " << sdName.Data()
598  << "\nCheck file and rerun!\n";
599  return kFALSE;
600  }
601 
602  // check if the data is consistent
603 
604  if (HcalDetId(sd, iEta, iPhi, depth) != HcalDetId(detId)) {
605  edm::LogWarning("HcalCalib")
606  << "\nInconsistent info in phi symmetry file: subdet, iEta, iPhi, depth do not match rawId!\n";
607  return kFALSE;
608  }
609  HcalDetId hId(detId);
610  if (!topo_->valid(hId)) {
611  edm::LogWarning("HcalCalib") << "\nInvalid DetId from: iEta=" << iEta << " iPhi=" << iPhi << " depth=" << depth
612  << " subdet=" << sdName.Data() << " detId=" << detId << "\n";
613  return kFALSE;
614  }
615 
616  phiSymCor[HcalDetId(sd, iEta, iPhi, depth)] = value;
617  }
618 
619  return kTRUE;
620 }
TString PHI_SYM_COR_FILENAME
Definition: hcalCalib.h:174
bool valid(const DetId &id) const override
std::map< UInt_t, Float_t > phiSymCor
Definition: hcalCalib.h:231
HcalSubdetector
Definition: HcalAssistant.h:31
Definition: value.py:1
const HcalTopology * topo_
Definition: hcalCalib.h:181
Log< level::Warning, false > LogWarning

◆ SetApplyPhiSymCorFlag()

void hcalCalib::SetApplyPhiSymCorFlag ( Bool_t  b)
inline

Definition at line 204 of file hcalCalib.h.

References APPLY_PHI_SYM_COR_FLAG, and b.

Referenced by HcalCalibrator::endJob().

Bool_t APPLY_PHI_SYM_COR_FLAG
Definition: hcalCalib.h:175
double b
Definition: hdecay.h:118

◆ SetCalibAbsIEtaMax()

void hcalCalib::SetCalibAbsIEtaMax ( Int_t  i)
inline

Definition at line 200 of file hcalCalib.h.

References CALIB_ABS_IETA_MAX, and mps_fire::i.

Referenced by HcalCalibrator::endJob().

200 { CALIB_ABS_IETA_MAX = i; }
Int_t CALIB_ABS_IETA_MAX
Definition: hcalCalib.h:161

◆ SetCalibAbsIEtaMin()

void hcalCalib::SetCalibAbsIEtaMin ( Int_t  i)
inline

Definition at line 201 of file hcalCalib.h.

References CALIB_ABS_IETA_MIN, and mps_fire::i.

Referenced by HcalCalibrator::endJob().

201 { CALIB_ABS_IETA_MIN = i; }
Int_t CALIB_ABS_IETA_MIN
Definition: hcalCalib.h:162

◆ SetCalibMethod()

void hcalCalib::SetCalibMethod ( const TString &  s)
inline

Definition at line 193 of file hcalCalib.h.

References CALIB_METHOD, and alignCSCRings::s.

Referenced by HcalCalibrator::endJob().

193 { CALIB_METHOD = s; }
TString CALIB_METHOD
Definition: hcalCalib.h:172

◆ SetCalibType()

void hcalCalib::SetCalibType ( const TString &  s)
inline

Definition at line 192 of file hcalCalib.h.

References CALIB_TYPE, and alignCSCRings::s.

Referenced by HcalCalibrator::endJob().

192 { CALIB_TYPE = s; }
TString CALIB_TYPE
Definition: hcalCalib.h:171

◆ SetCaloGeometry()

void hcalCalib::SetCaloGeometry ( const CaloGeometry g,
const HcalTopology topo 
)
inline

Definition at line 214 of file hcalCalib.h.

References g, theCaloGeometry, and topo_.

Referenced by HcalCalibrator::endJob().

214  {
215  theCaloGeometry = g;
216  topo_ = topo;
217  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const HcalTopology * topo_
Definition: hcalCalib.h:181
const CaloGeometry * theCaloGeometry
Definition: hcalCalib.h:180

◆ SetCombinePhiFlag()

void hcalCalib::SetCombinePhiFlag ( Bool_t  b)
inline

Definition at line 187 of file hcalCalib.h.

References b, and COMBINE_PHI.

Referenced by HcalCalibrator::endJob().

187 { COMBINE_PHI = b; }
Bool_t COMBINE_PHI
Definition: hcalCalib.h:153
double b
Definition: hdecay.h:118

◆ SetConeMaxDist()

void hcalCalib::SetConeMaxDist ( Float_t  d)
inline

Definition at line 198 of file hcalCalib.h.

References ztail::d, and MAX_CONE_DIST.

Referenced by HcalCalibrator::endJob().

198 { MAX_CONE_DIST = d; }
d
Definition: ztail.py:151
Float_t MAX_CONE_DIST
Definition: hcalCalib.h:159

◆ SetHbClusterSize()

void hcalCalib::SetHbClusterSize ( Int_t  i)
inline

Definition at line 194 of file hcalCalib.h.

References HB_CLUSTER_SIZE, and mps_fire::i.

Referenced by HcalCalibrator::endJob().

194 { HB_CLUSTER_SIZE = i; }
Int_t HB_CLUSTER_SIZE
Definition: hcalCalib.h:155

◆ SetHeClusterSize()

void hcalCalib::SetHeClusterSize ( Int_t  i)
inline

Definition at line 195 of file hcalCalib.h.

References HE_CLUSTER_SIZE, and mps_fire::i.

Referenced by HcalCalibrator::endJob().

195 { HE_CLUSTER_SIZE = i; }
Int_t HE_CLUSTER_SIZE
Definition: hcalCalib.h:156

◆ SetHistoFileName()

void hcalCalib::SetHistoFileName ( const TString &  filename)
inline

Definition at line 212 of file hcalCalib.h.

References corrVsCorr::filename, and HISTO_FILENAME.

Referenced by HcalCalibrator::endJob().

TString HISTO_FILENAME
Definition: hcalCalib.h:178

◆ SetInputList()

void hcalCalib::SetInputList ( TList *  input)
inlineoverride

Definition at line 134 of file hcalCalib.h.

References input.

134 { fInput = input; }
static std::string const input
Definition: EdmProvDump.cc:50

◆ SetMaxEOverP()

void hcalCalib::SetMaxEOverP ( Float_t  e)
inline

Definition at line 190 of file hcalCalib.h.

References MillePedeFileConverter_cfg::e, and MAX_EOVERP.

Referenced by HcalCalibrator::endJob().

◆ SetMaxEtThirdJet()

void hcalCalib::SetMaxEtThirdJet ( Float_t  et)
inline

Definition at line 202 of file hcalCalib.h.

References EgHLTOffHistBins_cfi::et, and MAX_ET_THIRD_JET.

Referenced by HcalCalibrator::endJob().

◆ SetMaxProbeJetEmFrac()

void hcalCalib::SetMaxProbeJetEmFrac ( Float_t  f)
inline

Definition at line 206 of file hcalCalib.h.

References f, and MAX_PROBEJET_EMFRAC.

Referenced by HcalCalibrator::endJob().

206 { MAX_PROBEJET_EMFRAC = f; }
double f[11][100]
Float_t MAX_PROBEJET_EMFRAC
Definition: hcalCalib.h:164

◆ SetMaxTagJetAbsEta()

void hcalCalib::SetMaxTagJetAbsEta ( Float_t  e)
inline

◆ SetMaxTagJetEmFrac()

void hcalCalib::SetMaxTagJetEmFrac ( Float_t  f)
inline

Definition at line 207 of file hcalCalib.h.

References f, and MAX_TAGJET_EMFRAC.

Referenced by HcalCalibrator::endJob().

207 { MAX_TAGJET_EMFRAC = f; }
double f[11][100]
Float_t MAX_TAGJET_EMFRAC
Definition: hcalCalib.h:165

◆ SetMaxTargetE()

void hcalCalib::SetMaxTargetE ( Float_t  e)
inline

◆ SetMaxTrkEmE()

void hcalCalib::SetMaxTrkEmE ( Float_t  e)
inline

Definition at line 191 of file hcalCalib.h.

References MillePedeFileConverter_cfg::e, and MAX_TRK_EME.

Referenced by HcalCalibrator::endJob().

◆ SetMinCellE()

void hcalCalib::SetMinCellE ( Float_t  e)
inline

Definition at line 188 of file hcalCalib.h.

References MillePedeFileConverter_cfg::e, and MIN_CELL_E.

Referenced by HcalCalibrator::endJob().

◆ SetMinDPhiDiJets()

void hcalCalib::SetMinDPhiDiJets ( Float_t  dphi)
inline

Definition at line 203 of file hcalCalib.h.

References MIN_DPHI_DIJETS.

Referenced by HcalCalibrator::endJob().

203 { MIN_DPHI_DIJETS = dphi; }
Float_t MIN_DPHI_DIJETS
Definition: hcalCalib.h:149

◆ SetMinEOverP()

void hcalCalib::SetMinEOverP ( Float_t  e)
inline

Definition at line 189 of file hcalCalib.h.

References MillePedeFileConverter_cfg::e, and MIN_EOVERP.

Referenced by HcalCalibrator::endJob().

◆ SetMinProbeJetAbsEta()

void hcalCalib::SetMinProbeJetAbsEta ( Float_t  e)
inline

◆ SetMinTagJetEt()

void hcalCalib::SetMinTagJetEt ( Float_t  e)
inline

◆ SetMinTargetE()

void hcalCalib::SetMinTargetE ( Float_t  e)
inline

◆ SetObject()

void hcalCalib::SetObject ( TObject *  obj)
inlineoverride

Definition at line 133 of file hcalCalib.h.

References getGTfromDQMFile::obj.

133 { fObject = obj; }

◆ SetOption()

void hcalCalib::SetOption ( const char *  option)
inlineoverride

Definition at line 132 of file hcalCalib.h.

References fileinputsource_cfi::option.

132 { fOption = option; }

◆ SetOutputCorCoefFileName()

void hcalCalib::SetOutputCorCoefFileName ( const TString &  filename)
inline

Definition at line 211 of file hcalCalib.h.

References corrVsCorr::filename, and OUTPUT_COR_COEF_FILENAME.

Referenced by HcalCalibrator::endJob().

TString OUTPUT_COR_COEF_FILENAME
Definition: hcalCalib.h:177

◆ SetPhiSymCorFileName()

void hcalCalib::SetPhiSymCorFileName ( const TString &  filename)
inline

Definition at line 205 of file hcalCalib.h.

References corrVsCorr::filename, and PHI_SYM_COR_FILENAME.

Referenced by HcalCalibrator::endJob().

TString PHI_SYM_COR_FILENAME
Definition: hcalCalib.h:174

◆ SetSumDepthsFlag()

void hcalCalib::SetSumDepthsFlag ( Bool_t  b)
inline

Definition at line 185 of file hcalCalib.h.

References b, and SUM_DEPTHS.

Referenced by HcalCalibrator::endJob().

185 { SUM_DEPTHS = b; }
Bool_t SUM_DEPTHS
Definition: hcalCalib.h:151
double b
Definition: hdecay.h:118

◆ SetSumSmallDepthsFlag()

void hcalCalib::SetSumSmallDepthsFlag ( Bool_t  b)
inline

Definition at line 186 of file hcalCalib.h.

References b, and SUM_SMALL_DEPTHS.

Referenced by HcalCalibrator::endJob().

186 { SUM_SMALL_DEPTHS = b; }
double b
Definition: hdecay.h:118
Bool_t SUM_SMALL_DEPTHS
Definition: hcalCalib.h:152

◆ SetUseConeClustering()

void hcalCalib::SetUseConeClustering ( Bool_t  b)
inline

Definition at line 197 of file hcalCalib.h.

References b, and USE_CONE_CLUSTERING.

Referenced by HcalCalibrator::endJob().

197 { USE_CONE_CLUSTERING = b; }
Bool_t USE_CONE_CLUSTERING
Definition: hcalCalib.h:158
double b
Definition: hdecay.h:118

◆ Terminate()

void hcalCalib::Terminate ( )
override

Definition at line 316 of file hcalCalib.cc.

References funct::abs(), CALIB_ABS_IETA_MAX, CALIB_ABS_IETA_MIN, CALIB_METHOD, CALIB_TYPE, cellEnergies, cellIds, HcalDetId::depth(), GetCoefFromMtrxInvOfAve(), h1_allTrkP, h1_corResp, h1_corRespBarrel, h1_corRespEndcap, h1_corRespIEta, h1_numEventsTwrIEta, h1_rawResp, h1_rawRespBarrel, h1_rawRespEndcap, h1_rawSumE, h1_selTrkP_iEta10, h1_trkP, h2_dHitRefBarrel, h2_dHitRefEndcap, HcalBarrel, histoFile, mps_fire::i, l1tTowerCalibrationProducer_cfi::iEta, HcalDetId::ieta(), HcalDetId::ietaAbs(), iEtaCoefMap, HcalDetId::iphi(), MinL3AlgoUniv< IDdet >::iterate(), dqmiolumiharvest::j, makeTextFile(), refIEtaIPhi, findQualityFiles::size, solution, HcalDetId::subdet(), SUM_DEPTHS, SUM_SMALL_DEPTHS, targetEnergies, and trackerHitRTTI::vector.

316  {
317  edm::LogVerbatim("HcalCalib") << "\n\nFinished reading the events.\n"
318  << "Number of input objects: " << cellIds.size()
319  << "\nPerforming minimization: depending on selected method can take some time...\n\n";
320 
321  for (std::vector<std::pair<Int_t, UInt_t> >::iterator it_rp = refIEtaIPhi.begin(); it_rp != refIEtaIPhi.end();
322  ++it_rp) {
323  Float_t weight = (abs(it_rp->first) < 21) ? 1.0 / 72.0 : 1.0 / 36.0;
324  h1_numEventsTwrIEta->Fill(it_rp->first, weight);
325  }
326 
327  if (CALIB_METHOD == "MATRIX_INV_OF_ETA_AVE") {
329  } else if (CALIB_METHOD == "L3" || CALIB_METHOD == "L3_AND_MTRX_INV") {
330  int eventWeight = 2; // 2 is the default (try at some point 0,1,2,3)
331  MinL3AlgoUniv<UInt_t>* thisL3Algo = new MinL3AlgoUniv<UInt_t>(eventWeight);
332  int numIterations = 10; // default 10
333 
334  solution = thisL3Algo->iterate(cellEnergies, cellIds, targetEnergies, numIterations);
335 
336  // in order to handle the case where sumDepths="false", but the flag to sum depths 1,2 in HB towers 15, 16
337  // is set (sumSmallDepths) we create entries in "solution" to create equal correction here
338  // for each encountered coef in depth one.
339 
340  if (!SUM_DEPTHS && SUM_SMALL_DEPTHS) {
341  std::vector<UInt_t> idForSummedCells;
342 
343  for (std::map<UInt_t, Float_t>::iterator m_it = solution.begin(); m_it != solution.end(); ++m_it) {
344  if (HcalDetId(m_it->first).ietaAbs() != 15 && HcalDetId(m_it->first).ietaAbs() != 16)
345  continue;
346  if (HcalDetId(m_it->first).subdet() != HcalBarrel)
347  continue;
348  if (HcalDetId(m_it->first).depth() == 1)
349  idForSummedCells.push_back(HcalDetId(m_it->first));
350  }
351 
352  for (std::vector<UInt_t>::iterator v_it = idForSummedCells.begin(); v_it != idForSummedCells.end(); ++v_it) {
353  UInt_t addCoefId = HcalDetId(HcalBarrel, HcalDetId(*v_it).ieta(), HcalDetId(*v_it).iphi(), 2);
354  solution[addCoefId] = solution[*v_it];
355  }
356 
357  } // end of special treatment for "sumSmallDepths" mode
358 
359  if (CALIB_METHOD == "L3_AND_MTRX_INV") {
361 
362  // loop over the solution from L3 and multiply by the additional factor from
363  // the matrix inversion. Set coef outside of the valid calibration region =1.
364  for (std::map<UInt_t, Float_t>::iterator it_s = solution.begin(); it_s != solution.end(); ++it_s) {
365  Int_t iEtaSol = HcalDetId(it_s->first).ieta();
366  if (abs(iEtaSol) < CALIB_ABS_IETA_MIN || abs(iEtaSol) > CALIB_ABS_IETA_MAX)
367  it_s->second = 1.0;
368  else
369  it_s->second *= iEtaCoefMap[iEtaSol];
370  }
371 
372  } // if CALIB_METHOD=="L3_AND_MTRX_INV"
373 
374  } // end of L3 or L3 + mtrx inversion minimization
375 
376  // done getting the constants -> write the formatted file
377  makeTextFile();
378 
379  // fill some histograms
380  Float_t rawResp = 0;
381  Float_t corResp = 0;
382  Int_t maxIEta = 0;
383  Int_t minIEta = 999;
384 
385  for (unsigned int i = 0; i < cellEnergies.size(); ++i) {
386  Int_t iEta;
387  for (unsigned int j = 0; j < (cellEnergies[i]).size(); ++j) {
388  iEta = HcalDetId(cellIds[i][j]).ieta();
389  rawResp += (cellEnergies[i])[j];
390 
391  if (CALIB_METHOD == "L3_AND_MTRX_INV") {
392  corResp += (solution[cellIds[i][j]] * cellEnergies[i][j]);
393  } else if (CALIB_METHOD == "L3") {
394  corResp += (solution[cellIds[i][j]] * (cellEnergies[i][j]));
395  } else if (CALIB_METHOD == "MATRIX_INV_OF_ETA_AVE") {
396  corResp += (iEtaCoefMap[iEta] * cellEnergies[i][j]);
397  }
398 
399  if (maxIEta < abs(iEta))
400  maxIEta = abs(iEta);
401  if (minIEta > abs(iEta))
402  minIEta = abs(iEta);
403  }
404 
405  rawResp /= targetEnergies[i];
406  corResp /= targetEnergies[i];
407 
408  // fill histograms based on iEta on ref point of the cluster (for now: hottest tower)
409  // expect range |iEta|<=24 (to do: add flexibility for arbitrary range)
410 
411  if (CALIB_TYPE == "ISO_TRACK") {
412  Int_t ind = refIEtaIPhi[i].first;
413  (ind < 0) ? (ind += 24) : (ind += 23);
414  if (ind >= 0 && ind < 48) {
415  h1_corRespIEta[ind]->Fill(corResp);
416  }
417 
418  // fill histograms for cases where all towers are in the barrel or endcap
419  if (maxIEta < 25) {
420  h1_rawResp->Fill(rawResp);
421  h1_corResp->Fill(corResp);
422  }
423  if (maxIEta < 15) {
424  h1_rawRespBarrel->Fill(rawResp);
425  h1_corRespBarrel->Fill(corResp);
426  } else if (maxIEta < 25 && minIEta > 16) {
427  h1_rawRespEndcap->Fill(rawResp);
428  h1_corRespEndcap->Fill(corResp);
429  }
430  } // histograms for isotrack calibration
431 
432  else {
433  // put jet plots here
434  }
435 
436  rawResp = 0;
437  corResp = 0;
438  maxIEta = 0;
439  minIEta = 999;
440  }
441 
442  // save the histograms
443  h1_trkP->Write();
444  h1_allTrkP->Write();
445 
446  h1_selTrkP_iEta10->Write();
447 
448  h1_rawSumE->Write();
449  h1_rawResp->Write();
450  h1_corResp->Write();
451  h1_rawRespBarrel->Write();
452  h1_corRespBarrel->Write();
453  h1_rawRespEndcap->Write();
454  h1_corRespEndcap->Write();
455  h1_numEventsTwrIEta->Write();
456  h2_dHitRefBarrel->Write();
457  h2_dHitRefEndcap->Write();
458  for (Int_t i = 0; i < 48; ++i) {
459  h1_corRespIEta[i]->Write();
460  }
461 
462  histoFile->Write();
463  histoFile->Close();
464 
465  edm::LogVerbatim("HcalCalib") << "\n Finished calibration.\n ";
466 
467 } // end of Terminate()
std::vector< std::pair< Int_t, UInt_t > > refIEtaIPhi
Definition: hcalCalib.h:228
size
Write out results.
Log< level::Info, true > LogVerbatim
std::vector< Float_t > targetEnergies
Definition: hcalCalib.h:229
TH1F * h1_corRespBarrel
Definition: hcalCalib.h:109
TH1F * h1_trkP
Definition: hcalCalib.h:100
std::map< Int_t, Float_t > iEtaCoefMap
Definition: hcalCalib.h:235
std::vector< std::vector< UInt_t > > cellIds
Definition: hcalCalib.h:227
void GetCoefFromMtrxInvOfAve()
Definition: hcalCalib.cc:471
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
TString CALIB_TYPE
Definition: hcalCalib.h:171
Definition: weight.py:1
Bool_t SUM_DEPTHS
Definition: hcalCalib.h:151
TFile * histoFile
Definition: hcalCalib.h:97
Int_t CALIB_ABS_IETA_MIN
Definition: hcalCalib.h:162
TH1F * h1_rawSumE
Definition: hcalCalib.h:105
TH1F * h1_corRespEndcap
Definition: hcalCalib.h:111
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
TH2F * h2_dHitRefEndcap
Definition: hcalCalib.h:115
TH1F * h1_rawResp
Definition: hcalCalib.h:106
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
TH1F * h1_corResp
Definition: hcalCalib.h:107
TH1F * h1_rawRespBarrel
Definition: hcalCalib.h:108
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1F * h1_corRespIEta[48]
Definition: hcalCalib.h:119
TH1F * h1_numEventsTwrIEta
Definition: hcalCalib.h:112
std::map< UInt_t, Float_t > solution
Definition: hcalCalib.h:233
std::vector< std::vector< Float_t > > cellEnergies
Definition: hcalCalib.h:226
TString CALIB_METHOD
Definition: hcalCalib.h:172
TH1F * h1_rawRespEndcap
Definition: hcalCalib.h:110
Int_t CALIB_ABS_IETA_MAX
Definition: hcalCalib.h:161
void makeTextFile()
Definition: hcalCalib.cc:622
Bool_t SUM_SMALL_DEPTHS
Definition: hcalCalib.h:152
TH1F * h1_allTrkP
Definition: hcalCalib.h:101
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
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
TH1F * h1_selTrkP_iEta10
Definition: hcalCalib.h:103
TH2F * h2_dHitRefBarrel
Definition: hcalCalib.h:114
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164

◆ Version()

Int_t hcalCalib::Version ( ) const
inlineoverride

Definition at line 123 of file hcalCalib.h.

123 { return 2; }

Member Data Documentation

◆ APPLY_PHI_SYM_COR_FLAG

Bool_t hcalCalib::APPLY_PHI_SYM_COR_FLAG

Definition at line 175 of file hcalCalib.h.

Referenced by Begin(), Process(), and SetApplyPhiSymCorFlag().

◆ b_cells

TBranch* hcalCalib::b_cells

Definition at line 77 of file hcalCalib.h.

Referenced by Init().

◆ b_emEnergy

TBranch* hcalCalib::b_emEnergy

Definition at line 78 of file hcalCalib.h.

Referenced by Init().

◆ b_etVetoJet

TBranch* hcalCalib::b_etVetoJet

Definition at line 80 of file hcalCalib.h.

Referenced by Init().

◆ b_eventNumber

TBranch* hcalCalib::b_eventNumber

Definition at line 73 of file hcalCalib.h.

Referenced by Init().

◆ b_iEtaHit

TBranch* hcalCalib::b_iEtaHit

Definition at line 75 of file hcalCalib.h.

Referenced by Init().

◆ b_iPhiHit

TBranch* hcalCalib::b_iPhiHit

Definition at line 76 of file hcalCalib.h.

Referenced by Init().

◆ b_probeJetEmFrac

TBranch* hcalCalib::b_probeJetEmFrac

Definition at line 90 of file hcalCalib.h.

Referenced by Init().

◆ b_probeJetP4

TBranch* hcalCalib::b_probeJetP4

Definition at line 93 of file hcalCalib.h.

Referenced by Init().

◆ b_runNumber

TBranch* hcalCalib::b_runNumber

Definition at line 74 of file hcalCalib.h.

Referenced by Init().

◆ b_tagJetEmFrac

TBranch* hcalCalib::b_tagJetEmFrac

Definition at line 89 of file hcalCalib.h.

Referenced by Init().

◆ b_tagJetP4

TBranch* hcalCalib::b_tagJetP4

Definition at line 92 of file hcalCalib.h.

Referenced by Init().

◆ b_targetE

TBranch* hcalCalib::b_targetE

Definition at line 79 of file hcalCalib.h.

Referenced by Init().

◆ b_xTrkEcal

TBranch* hcalCalib::b_xTrkEcal

Definition at line 85 of file hcalCalib.h.

Referenced by Init().

◆ b_xTrkHcal

TBranch* hcalCalib::b_xTrkHcal

Definition at line 82 of file hcalCalib.h.

Referenced by Init().

◆ b_yTrkEcal

TBranch* hcalCalib::b_yTrkEcal

Definition at line 86 of file hcalCalib.h.

Referenced by Init().

◆ b_yTrkHcal

TBranch* hcalCalib::b_yTrkHcal

Definition at line 83 of file hcalCalib.h.

Referenced by Init().

◆ b_zTrkEcal

TBranch* hcalCalib::b_zTrkEcal

Definition at line 87 of file hcalCalib.h.

Referenced by Init().

◆ b_zTrkHcal

TBranch* hcalCalib::b_zTrkHcal

Definition at line 84 of file hcalCalib.h.

Referenced by Init().

◆ CALIB_ABS_IETA_MAX

Int_t hcalCalib::CALIB_ABS_IETA_MAX

Definition at line 161 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), makeTextFile(), SetCalibAbsIEtaMax(), and Terminate().

◆ CALIB_ABS_IETA_MIN

Int_t hcalCalib::CALIB_ABS_IETA_MIN

Definition at line 162 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), makeTextFile(), SetCalibAbsIEtaMin(), and Terminate().

◆ CALIB_METHOD

TString hcalCalib::CALIB_METHOD

Definition at line 172 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), makeTextFile(), SetCalibMethod(), and Terminate().

◆ CALIB_TYPE

TString hcalCalib::CALIB_TYPE

Definition at line 171 of file hcalCalib.h.

Referenced by Begin(), Process(), SetCalibType(), and Terminate().

◆ cellEnergies

std::vector<std::vector<Float_t> > hcalCalib::cellEnergies

Definition at line 226 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), Process(), and Terminate().

◆ cellIds

std::vector<std::vector<UInt_t> > hcalCalib::cellIds

Definition at line 227 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), Process(), and Terminate().

◆ cells

TClonesArray* hcalCalib::cells

Definition at line 54 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ COMBINE_PHI

Bool_t hcalCalib::COMBINE_PHI

Definition at line 153 of file hcalCalib.h.

Referenced by makeTextFile(), Process(), and SetCombinePhiFlag().

◆ emEnergy

Float_t hcalCalib::emEnergy

Definition at line 55 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ etVetoJet

Float_t hcalCalib::etVetoJet

Definition at line 57 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ eventNumber

UInt_t hcalCalib::eventNumber

pointer to the analyzed TTree or TChain

Definition at line 50 of file hcalCalib.h.

Referenced by Init().

◆ fChain

TTree* hcalCalib::fChain

Definition at line 48 of file hcalCalib.h.

Referenced by GetEntry(), and Init().

◆ h1_allTrkP

TH1F* hcalCalib::h1_allTrkP

Definition at line 101 of file hcalCalib.h.

Referenced by Begin(), Process(), and Terminate().

◆ h1_corResp

TH1F* hcalCalib::h1_corResp

Definition at line 107 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_corRespBarrel

TH1F* hcalCalib::h1_corRespBarrel

Definition at line 109 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_corRespEndcap

TH1F* hcalCalib::h1_corRespEndcap

Definition at line 111 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_corRespIEta

TH1F* hcalCalib::h1_corRespIEta[48]

Definition at line 119 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_numEventsTwrIEta

TH1F* hcalCalib::h1_numEventsTwrIEta

Definition at line 112 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_rawResp

TH1F* hcalCalib::h1_rawResp

Definition at line 106 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_rawRespBarrel

TH1F* hcalCalib::h1_rawRespBarrel

Definition at line 108 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_rawRespEndcap

TH1F* hcalCalib::h1_rawRespEndcap

Definition at line 110 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h1_rawSumE

TH1F* hcalCalib::h1_rawSumE

Definition at line 105 of file hcalCalib.h.

Referenced by Begin(), Process(), and Terminate().

◆ h1_selTrkP_iEta10

TH1F* hcalCalib::h1_selTrkP_iEta10

Definition at line 103 of file hcalCalib.h.

Referenced by Begin(), Process(), and Terminate().

◆ h1_trkP

TH1F* hcalCalib::h1_trkP

Definition at line 100 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ h2_dHitRefBarrel

TH2F* hcalCalib::h2_dHitRefBarrel

Definition at line 114 of file hcalCalib.h.

Referenced by Begin(), Process(), and Terminate().

◆ h2_dHitRefEndcap

TH2F* hcalCalib::h2_dHitRefEndcap

Definition at line 115 of file hcalCalib.h.

Referenced by Begin(), Process(), and Terminate().

◆ HB_CLUSTER_SIZE

Int_t hcalCalib::HB_CLUSTER_SIZE

Definition at line 155 of file hcalCalib.h.

Referenced by Process(), and SetHbClusterSize().

◆ HE_CLUSTER_SIZE

Int_t hcalCalib::HE_CLUSTER_SIZE

Definition at line 156 of file hcalCalib.h.

Referenced by Process(), and SetHeClusterSize().

◆ HISTO_FILENAME

TString hcalCalib::HISTO_FILENAME

Definition at line 178 of file hcalCalib.h.

Referenced by Begin(), and SetHistoFileName().

◆ histoFile

TFile* hcalCalib::histoFile

Definition at line 97 of file hcalCalib.h.

Referenced by Begin(), and Terminate().

◆ iEtaCoefMap

std::map<Int_t, Float_t> hcalCalib::iEtaCoefMap

Definition at line 235 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), makeTextFile(), and Terminate().

◆ iEtaHit

Int_t hcalCalib::iEtaHit

Definition at line 52 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ iPhiHit

UInt_t hcalCalib::iPhiHit

Definition at line 53 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ MAX_CONE_DIST

Float_t hcalCalib::MAX_CONE_DIST

Definition at line 159 of file hcalCalib.h.

Referenced by Process(), and SetConeMaxDist().

◆ MAX_EOVERP

Float_t hcalCalib::MAX_EOVERP

Definition at line 145 of file hcalCalib.h.

Referenced by Process(), and SetMaxEOverP().

◆ MAX_ET_THIRD_JET

Float_t hcalCalib::MAX_ET_THIRD_JET

Definition at line 148 of file hcalCalib.h.

Referenced by Process(), and SetMaxEtThirdJet().

◆ MAX_PROBEJET_EMFRAC

Float_t hcalCalib::MAX_PROBEJET_EMFRAC

Definition at line 164 of file hcalCalib.h.

Referenced by Process(), and SetMaxProbeJetEmFrac().

◆ MAX_TAGJET_ABSETA

Float_t hcalCalib::MAX_TAGJET_ABSETA

Definition at line 166 of file hcalCalib.h.

Referenced by Process(), and SetMaxTagJetAbsEta().

◆ MAX_TAGJET_EMFRAC

Float_t hcalCalib::MAX_TAGJET_EMFRAC

Definition at line 165 of file hcalCalib.h.

Referenced by SetMaxTagJetEmFrac().

◆ MAX_TARGET_E

Float_t hcalCalib::MAX_TARGET_E

Definition at line 141 of file hcalCalib.h.

Referenced by Process(), and SetMaxTargetE().

◆ MAX_TRK_EME

Float_t hcalCalib::MAX_TRK_EME

Definition at line 146 of file hcalCalib.h.

Referenced by Process(), and SetMaxTrkEmE().

◆ MIN_CELL_E

Float_t hcalCalib::MIN_CELL_E

Definition at line 143 of file hcalCalib.h.

Referenced by Process(), and SetMinCellE().

◆ MIN_DPHI_DIJETS

Float_t hcalCalib::MIN_DPHI_DIJETS

Definition at line 149 of file hcalCalib.h.

Referenced by Process(), and SetMinDPhiDiJets().

◆ MIN_EOVERP

Float_t hcalCalib::MIN_EOVERP

Definition at line 144 of file hcalCalib.h.

Referenced by Process(), and SetMinEOverP().

◆ MIN_PROBEJET_ABSETA

Float_t hcalCalib::MIN_PROBEJET_ABSETA

Definition at line 169 of file hcalCalib.h.

Referenced by Process(), and SetMinProbeJetAbsEta().

◆ MIN_TAGJET_ET

Float_t hcalCalib::MIN_TAGJET_ET

Definition at line 167 of file hcalCalib.h.

Referenced by Process(), and SetMinTagJetEt().

◆ MIN_TARGET_E

Float_t hcalCalib::MIN_TARGET_E

Definition at line 140 of file hcalCalib.h.

Referenced by SetMinTargetE().

◆ nEvents

UInt_t hcalCalib::nEvents

Definition at line 95 of file hcalCalib.h.

Referenced by Begin(), looper.Looper::loop(), and Process().

◆ OUTPUT_COR_COEF_FILENAME

TString hcalCalib::OUTPUT_COR_COEF_FILENAME

Definition at line 177 of file hcalCalib.h.

Referenced by makeTextFile(), and SetOutputCorCoefFileName().

◆ PHI_SYM_COR_FILENAME

TString hcalCalib::PHI_SYM_COR_FILENAME

Definition at line 174 of file hcalCalib.h.

Referenced by ReadPhiSymCor(), and SetPhiSymCorFileName().

◆ phiSymCor

std::map<UInt_t, Float_t> hcalCalib::phiSymCor

Definition at line 231 of file hcalCalib.h.

Referenced by Process(), and ReadPhiSymCor().

◆ probeJetEmFrac

Float_t hcalCalib::probeJetEmFrac

Definition at line 70 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ probeJetP4

TLorentzVector* hcalCalib::probeJetP4

Definition at line 67 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ refIEtaIPhi

std::vector<std::pair<Int_t, UInt_t> > hcalCalib::refIEtaIPhi

Definition at line 228 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), Process(), and Terminate().

◆ runNumber

UInt_t hcalCalib::runNumber

Definition at line 51 of file hcalCalib.h.

Referenced by Init(), and TH2PolyOfflineMaps.TH2PolyOfflineMaps::PrintTrackerMaps().

◆ solution

std::map<UInt_t, Float_t> hcalCalib::solution

Definition at line 233 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), makeTextFile(), and Terminate().

◆ SUM_DEPTHS

Bool_t hcalCalib::SUM_DEPTHS

Definition at line 151 of file hcalCalib.h.

Referenced by makeTextFile(), Process(), SetSumDepthsFlag(), and Terminate().

◆ SUM_SMALL_DEPTHS

Bool_t hcalCalib::SUM_SMALL_DEPTHS

Definition at line 152 of file hcalCalib.h.

Referenced by Process(), SetSumSmallDepthsFlag(), and Terminate().

◆ tagJetEmFrac

Float_t hcalCalib::tagJetEmFrac

Definition at line 69 of file hcalCalib.h.

Referenced by Init().

◆ tagJetP4

TLorentzVector* hcalCalib::tagJetP4

Definition at line 66 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ targetE

Float_t hcalCalib::targetE

Definition at line 56 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ targetEnergies

std::vector<Float_t> hcalCalib::targetEnergies

Definition at line 229 of file hcalCalib.h.

Referenced by GetCoefFromMtrxInvOfAve(), Process(), and Terminate().

◆ theCaloGeometry

const CaloGeometry* hcalCalib::theCaloGeometry

Definition at line 180 of file hcalCalib.h.

Referenced by Process(), and SetCaloGeometry().

◆ topo_

const HcalTopology* hcalCalib::topo_

Definition at line 181 of file hcalCalib.h.

Referenced by makeTextFile(), ReadPhiSymCor(), and SetCaloGeometry().

◆ USE_CONE_CLUSTERING

Bool_t hcalCalib::USE_CONE_CLUSTERING

Definition at line 158 of file hcalCalib.h.

Referenced by Process(), and SetUseConeClustering().

◆ xTrkEcal

Float_t hcalCalib::xTrkEcal

Definition at line 62 of file hcalCalib.h.

Referenced by Init().

◆ xTrkHcal

Float_t hcalCalib::xTrkHcal

Definition at line 59 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ yTrkEcal

Float_t hcalCalib::yTrkEcal

Definition at line 63 of file hcalCalib.h.

Referenced by Init().

◆ yTrkHcal

Float_t hcalCalib::yTrkHcal

Definition at line 60 of file hcalCalib.h.

Referenced by Init(), and Process().

◆ zTrkEcal

Float_t hcalCalib::zTrkEcal

Definition at line 64 of file hcalCalib.h.

Referenced by Init().

◆ zTrkHcal

Float_t hcalCalib::zTrkHcal

Definition at line 61 of file hcalCalib.h.

Referenced by Init(), and Process().