|
|
#include <PhiSymmetryCalibration.h>
|
void | analyze (const edm::Event &, const edm::EventSetup &) override |
| Called at each event. More...
|
|
void | beginJob () override |
| Called at beginning of job. More...
|
|
void | endJob () override |
| Called at end of job. More...
|
|
void | endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override |
|
void | endRun (edm::Run const &, const edm::EventSetup &) override |
|
| PhiSymmetryCalibration (const edm::ParameterSet &iConfig) |
| Constructor. More...
|
|
void | setUp (const edm::EventSetup &setup) |
|
| ~PhiSymmetryCalibration () override |
| Destructor. More...
|
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzer () |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () |
|
SerialTaskQueue * | globalRunsQueue () |
|
ModuleDescription const & | moduleDescription () const |
|
std::string | workerType () const |
|
| ~EDAnalyzer () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDAnalyzer | ModuleType |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &) |
|
static bool | wantsGlobalLuminosityBlocks () |
|
static bool | wantsGlobalRuns () |
|
static bool | wantsInputProcessBlocks () |
|
static bool | wantsProcessBlocks () |
|
static bool | wantsStreamLuminosityBlocks () |
|
static bool | wantsStreamRuns () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Definition at line 34 of file PhiSymmetryCalibration.h.
◆ PhiSymmetryCalibration()
Constructor.
Definition at line 49 of file PhiSymmetryCalibration.cc.
References e_spectrum_b_histos, e_spectrum_e_histos, et_spectrum_b_histos, et_spectrum_e_histos, eventsinlb_, eventsinrun_, isfirstpass_, kBarlRings, kEndcEtaRings, nevents_, and spectra.
◆ ~PhiSymmetryCalibration()
PhiSymmetryCalibration::~PhiSymmetryCalibration |
( |
| ) |
|
|
override |
◆ analyze()
Called at each event.
Implements edm::EDAnalyzer.
Definition at line 230 of file PhiSymmetryCalibration.cc.
243 if (!barrelRecHitsHandle.
isValid()) {
244 LogError(
"") <<
"[PhiSymmetryCalibration] Error! Can't get product!" << std::endl;
248 if (!endcapRecHitsHandle.
isValid()) {
249 LogError(
"") <<
"[PhiSymmetryCalibration] Error! Can't get product!" << std::endl;
261 for (itb = barrelRecHitsHandle->
begin(); itb != barrelRecHitsHandle->
end(); itb++) {
264 float et = itb->energy() / cosh(
eta);
265 float e = itb->energy();
276 int sign =
hit.ieta() > 0 ? 1 : 0;
307 for (ite = endcapRecHitsHandle->
begin(); ite != endcapRecHitsHandle->
end(); ite++) {
312 float et = ite->energy() / cosh(
eta);
313 float e = ite->energy();
321 int sign =
hit.zside() > 0 ? 1 : 0;
326 double eCut_endc = 0;
330 eCut_endc =
ap_ + eta_ring *
b_;
334 float et_thr = eCut_endc / cosh(
eta) + 1.;
References funct::abs(), ap_, b_, barrelHits_, edm::SortedCollection< T, SORT >::begin(), EcalGeomPhiSymHelper::cellPos_, MillePedeFileConverter_cfg::e, e_, e_spectrum_b_histos, e_spectrum_e_histos, DetId::Ecal, EcalBarrel, EcalEndcap, ecalHitsProducer_, eCut_barl_, edm::SortedCollection< T, SORT >::end(), endcapHits_, EcalGeomPhiSymHelper::endcapRing_, EgHLTOffHistBins_cfi::et, et_spectrum_b_histos, et_spectrum_e_histos, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), EcalGeomPhiSymHelper::etaBoundary_, etsum_barl_, etsum_barl_miscal_, etsum_endc_, etsum_endc_miscal_, eventSet_, eventsinlb_, eventsinrun_, HcalObjRepresent::Fill(), get, CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getSubdetectorGeometry(), EcalGeomPhiSymHelper::goodCell_barl, EcalGeomPhiSymHelper::goodCell_endc, isfirstpass_, edm::HandleBase::isValid(), kEndcEtaRings, kNMiscalBinsEB, kNMiscalBinsEE, miscalEB_, miscalEE_, nevents_, nhits_barl_, nhits_endc_, EcalGeomPhiSymHelper::nRing_, oldCalibs_, reiteration_, relativeConstraints::ring, singleTopDQM_cfi::setup, setUp(), Validation_hcalonly_cfi::sign, and spectra.
◆ beginJob()
void PhiSymmetryCalibration::beginJob |
( |
void |
| ) |
|
|
overridevirtual |
Called at beginning of job.
Reimplemented from edm::EDAnalyzer.
Definition at line 93 of file PhiSymmetryCalibration.cc.
129 t <<
"et_spectrum_b_" <<
i + 1;
133 t <<
"e_spectrum_b_" <<
i + 1;
138 t <<
"et_spectrum_e_" <<
i + 1;
142 t <<
"e_spectrum_e_" <<
i + 1;
References e_spectrum_b_histos, e_spectrum_e_histos, et_spectrum_b_histos, et_spectrum_e_histos, etsum_barl_, etsum_barl_miscal_, etsum_endc_, etsum_endc_miscal_, eventSet_, mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, kBarlRings, kBarlWedges, kEndcEtaRings, kEndcWedgesX, kEndcWedgesY, kMiscalRangeEB, kMiscalRangeEE, kNMiscalBinsEB, kNMiscalBinsEE, kSides, miscalEB_, miscalEE_, nhits_barl_, nhits_endc_, relativeConstraints::ring, Validation_hcalonly_cfi::sign, spectra, and submitPVValidationJobs::t.
◆ endJob()
void PhiSymmetryCalibration::endJob |
( |
void |
| ) |
|
|
overridevirtual |
Called at end of job.
Reimplemented from edm::EDAnalyzer.
Definition at line 153 of file PhiSymmetryCalibration.cc.
154 edm::LogInfo(
"Calibration") <<
"[PhiSymmetryCalibration] At end of job";
158 TFile
f(
"Espectra_plus.root",
"recreate");
178 std::ofstream k_barl_out(
"k_barl.dat",
ios::out);
183 std::ofstream k_endc_out(
"k_endc.dat",
ios::out);
192 stringstream etsum_file_barl;
193 etsum_file_barl <<
"etsum_barl_" <<
eventSet_ <<
".dat";
195 std::ofstream etsum_barl_out(etsum_file_barl.str().c_str(),
ios::out);
205 etsum_barl_out.close();
207 stringstream etsum_file_endc;
208 etsum_file_endc <<
"etsum_endc_" <<
eventSet_ <<
".dat";
210 std::ofstream etsum_endc_out(etsum_file_endc.str().c_str(),
ios::out);
222 etsum_endc_out.close();
References gather_cfg::cout, e_, e_spectrum_b_histos, e_spectrum_e_histos, EcalGeomPhiSymHelper::endcapRing_, et_spectrum_b_histos, et_spectrum_e_histos, etsum_barl_, etsum_endc_, eventSet_, f, getKfactors(), mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, k_barl_, k_endc_, kBarlRings, kBarlWedges, kEndcEtaRings, kEndcWedgesX, kEndcWedgesY, kSides, nevents_, nhits_barl_, nhits_endc_, MillePedeFileConverter_cfg::out, relativeConstraints::ring, Validation_hcalonly_cfi::sign, and spectra.
Referenced by o2olib.O2ORunMgr::executeJob().
◆ endLuminosityBlock()
◆ endRun()
◆ getKfactors()
void PhiSymmetryCalibration::getKfactors |
( |
| ) |
|
|
private |
Definition at line 393 of file PhiSymmetryCalibration.cc.
400 std::vector<TGraph*> k_barl_graph(
kBarlRings);
401 std::vector<TCanvas*> k_barl_plot(
kBarlRings);
404 TF1 mypol1(
"mypol1",
"pol1");
409 epsilon_M_eb[imiscal] =
miscalEB_[imiscal] - 1.;
412 k_barl_graph[
ieta]->Fit(&mypol1);
415 t <<
"k_barl_" <<
ieta + 1;
416 k_barl_plot[
ieta] =
new TCanvas(
t.str().c_str(),
"");
417 k_barl_plot[
ieta]->SetFillColor(10);
418 k_barl_plot[
ieta]->SetGrid();
419 k_barl_graph[
ieta]->SetMarkerSize(1.);
420 k_barl_graph[
ieta]->SetMarkerColor(4);
421 k_barl_graph[
ieta]->SetMarkerStyle(20);
423 k_barl_graph[
ieta]->GetXaxis()->SetTitleSize(.05);
424 k_barl_graph[
ieta]->GetYaxis()->SetTitleSize(.05);
425 k_barl_graph[
ieta]->GetXaxis()->SetTitle(
"#epsilon_{M}");
426 k_barl_graph[
ieta]->GetYaxis()->SetTitle(
"#epsilon_{T}");
427 k_barl_graph[
ieta]->Draw(
"AP");
429 k_barl_[
ieta] = k_barl_graph[
ieta]->GetFunction(
"pol1")->GetParameter(1);
440 epsilon_M_ee[imiscal] =
miscalEE_[imiscal] - 1.;
443 k_endc_graph[
ring]->Fit(&mypol1);
446 t <<
"k_endc_" <<
ring + 1;
447 k_endc_plot[
ring] =
new TCanvas(
t.str().c_str(),
"");
448 k_endc_plot[
ring]->SetFillColor(10);
449 k_endc_plot[
ring]->SetGrid();
450 k_endc_graph[
ring]->SetMarkerSize(1.);
451 k_endc_graph[
ring]->SetMarkerColor(4);
452 k_endc_graph[
ring]->SetMarkerStyle(20);
454 k_endc_graph[
ring]->GetXaxis()->SetTitleSize(.05);
455 k_endc_graph[
ring]->GetYaxis()->SetTitleSize(.05);
456 k_endc_graph[
ring]->GetXaxis()->SetTitle(
"#epsilon_{M}");
457 k_endc_graph[
ring]->GetYaxis()->SetTitle(
"#epsilon_{T}");
458 k_endc_graph[
ring]->Draw(
"AP");
460 k_endc_[
ring] = k_endc_graph[
ring]->GetFunction(
"pol1")->GetParameter(1);
464 TFile
f(
"PhiSymmetryCalibration_kFactors.root",
"recreate");
466 k_barl_plot[
ieta]->Write();
467 delete k_barl_plot[
ieta];
468 delete k_barl_graph[
ieta];
471 k_endc_plot[
ring]->Write();
472 delete k_endc_plot[
ring];
473 delete k_endc_graph[
ring];
References gather_cfg::cout, etsum_barl_miscal_, etsum_endc_miscal_, f, LEDCalibrationChannels::ieta, createfilelist::int, k_barl_, k_endc_, kBarlRings, kEndcEtaRings, kMiscalRangeEB, kMiscalRangeEE, kNMiscalBinsEB, kNMiscalBinsEE, miscalEB_, miscalEE_, relativeConstraints::ring, and submitPVValidationJobs::t.
Referenced by endJob().
◆ setUp()
Definition at line 480 of file PhiSymmetryCalibration.cc.
500 edm::LogError(
"PhiSym") <<
"Error reading XML files" << endl;
References e_, edm::FileInPath::fullPath(), get, h, oldcalibfile_, oldCalibs_, EcalFloatCondObjectContainerXMLTranslator::readXML(), reiteration_, runTheMatrix::ret, EcalGeomPhiSymHelper::setup(), singleTopDQM_cfi::setup, and statusThreshold_.
Referenced by analyze().
◆ ap_
double PhiSymmetryCalibration::ap_ |
|
private |
◆ b_
double PhiSymmetryCalibration::b_ |
|
private |
◆ barrelCells
std::vector<DetId> PhiSymmetryCalibration::barrelCells |
|
private |
◆ barrelHits_
std::string PhiSymmetryCalibration::barrelHits_ |
|
private |
◆ e_
◆ e_spectrum_b_histos
std::vector<TH1F*> PhiSymmetryCalibration::e_spectrum_b_histos |
|
private |
◆ e_spectrum_e_histos
std::vector<TH1F*> PhiSymmetryCalibration::e_spectrum_e_histos |
|
private |
◆ ecalHitsProducer_
std::string PhiSymmetryCalibration::ecalHitsProducer_ |
|
private |
◆ eCut_barl_
double PhiSymmetryCalibration::eCut_barl_ |
|
private |
◆ endcapCells
std::vector<DetId> PhiSymmetryCalibration::endcapCells |
|
private |
◆ endcapHits_
std::string PhiSymmetryCalibration::endcapHits_ |
|
private |
◆ epsilon_M_barl
◆ epsilon_M_endc
◆ esumMean_barl_
double PhiSymmetryCalibration::esumMean_barl_[kBarlRings] |
|
private |
◆ esumMean_endc_
◆ et_spectrum_b_histos
std::vector<TH1F*> PhiSymmetryCalibration::et_spectrum_b_histos |
|
private |
◆ et_spectrum_e_histos
std::vector<TH1F*> PhiSymmetryCalibration::et_spectrum_e_histos |
|
private |
◆ etsum_barl_
◆ etsum_barl_miscal_
◆ etsum_endc_
◆ etsum_endc_miscal_
◆ etsum_endc_uncorr
◆ etsumMean_barl_
double PhiSymmetryCalibration::etsumMean_barl_[kBarlRings] |
|
private |
◆ etsumMean_endc_
◆ eventSet_
int PhiSymmetryCalibration::eventSet_ |
|
private |
◆ eventsinlb_
int PhiSymmetryCalibration::eventsinlb_ |
|
private |
◆ eventsinrun_
int PhiSymmetryCalibration::eventsinrun_ |
|
private |
◆ isfirstpass_
bool PhiSymmetryCalibration::isfirstpass_ |
|
private |
◆ k_barl_
double PhiSymmetryCalibration::k_barl_[kBarlRings] |
|
private |
◆ k_endc_
◆ kMaxEndciPhi
const int PhiSymmetryCalibration::kMaxEndciPhi = 360 |
|
staticprivate |
◆ kMiscalRangeEB
const float PhiSymmetryCalibration::kMiscalRangeEB = .05 |
|
staticprivate |
◆ kMiscalRangeEE
const float PhiSymmetryCalibration::kMiscalRangeEE = .10 |
|
staticprivate |
◆ kNMiscalBinsEB
const int PhiSymmetryCalibration::kNMiscalBinsEB = 21 |
|
staticprivate |
◆ kNMiscalBinsEE
const int PhiSymmetryCalibration::kNMiscalBinsEE = 41 |
|
staticprivate |
◆ miscalEB_
◆ miscalEE_
◆ nevents_
int PhiSymmetryCalibration::nevents_ |
|
private |
◆ newCalibs_barl
◆ newCalibs_endc
◆ nhits_barl_
◆ nhits_endc_
◆ oldcalibfile_
std::string PhiSymmetryCalibration::oldcalibfile_ |
|
private |
◆ oldCalibs_
◆ oldCalibs_barl
◆ oldCalibs_endc
◆ phi_endc
◆ rawconst_barl
◆ rawconst_endc
◆ reiteration_
bool PhiSymmetryCalibration::reiteration_ |
|
private |
◆ spectra
bool PhiSymmetryCalibration::spectra |
|
private |
◆ statusThreshold_
int PhiSymmetryCalibration::statusThreshold_ |
|
private |
ret
prodAgent to be discontinued
static const int kBarlRings
std::vector< EcalRecHit >::const_iterator const_iterator
unsigned int nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
double miscalEB_[kNMiscalBinsEB]
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
static const int kNMiscalBinsEE
std::vector< TH1F * > e_spectrum_e_histos
static const int kEndcWedgesY
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
std::string oldcalibfile_
double etaBoundary_[kEndcEtaRings+1]
void setup(const CaloGeometry *geometry, const EcalChannelStatus *chstatus, int statusThreshold)
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double miscalEE_[kNMiscalBinsEE]
double k_barl_[kBarlRings]
static const float kMiscalRangeEE
const_iterator begin() const
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
static const float kMiscalRangeEB
static const int kNMiscalBinsEB
const_iterator end() const
void setUp(const edm::EventSetup &setup)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
static const int kEndcEtaRings
Log< level::Error, false > LogError
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< TH1F * > et_spectrum_b_histos
static const int kEndcWedgesX
EcalIntercalibConstants oldCalibs_
the old calibration constants (when reiterating, the last ones derived)
std::vector< TH1F * > e_spectrum_b_histos
T getParameter(std::string const &) const
double etsum_endc_miscal_[kNMiscalBinsEE][kEndcEtaRings]
static const int kBarlWedges
Abs< T >::type abs(const T &t)
std::vector< TH1F * > et_spectrum_e_histos
std::string ecalHitsProducer_
double etsum_barl_miscal_[kNMiscalBinsEB][kBarlRings]
int nRing_[kEndcEtaRings]
double k_endc_[kEndcEtaRings]
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
int statusThreshold_
threshold in channel status beyond which channel is marked bad