CMS 3D CMS Logo

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

#include <EcalTrivialObjectAnalyzer.h>

Inheritance diagram for EcalTrivialObjectAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
 EcalTrivialObjectAnalyzer (edm::ParameterSet const &p)
 
 ~EcalTrivialObjectAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcdadcToGevConstantToken_
 
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcdchannelStatusToken_
 
const edm::ESGetToken< EcalClusterCrackCorrParameters, EcalClusterCrackCorrParametersRcdclusterCrackCorrToken_
 
const edm::ESGetToken< EcalClusterEnergyCorrectionObjectSpecificParameters, EcalClusterEnergyCorrectionObjectSpecificParametersRcdclusterEnergyCorrectionObjectSpecificToken_
 
const edm::ESGetToken< EcalClusterEnergyCorrectionParameters, EcalClusterEnergyCorrectionParametersRcdclusterEnergyCorrectionToken_
 
const edm::ESGetToken< EcalClusterEnergyUncertaintyParameters, EcalClusterEnergyUncertaintyParametersRcdclusterEnergyUncertaintyToken_
 
const edm::ESGetToken< EcalClusterLocalContCorrParameters, EcalClusterLocalContCorrParametersRcdclusterLocalContCorrToken_
 
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcdgainRatiosToken_
 
const edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcdintercalibConstantsToken_
 
const edm::ESGetToken< EcalIntercalibErrors, EcalIntercalibErrorsRcdintercalibErrorsToken_
 
const edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcdlaserAlphasToken_
 
const edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcdlaserAPDPNRatiosRefToken_
 
const edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcdlaserAPDPNRatiosToken_
 
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcdpedestalsToken_
 
const edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcdsampleMaskToken_
 
const edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcdtbWeightsToken_
 
const edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcdtimeCalibConstantsToken_
 
const edm::ESGetToken< EcalTimeCalibErrors, EcalTimeCalibErrorsRcdtimeCalibErrorsToken_
 
const edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcdtimeOffsetConstantToken_
 
const edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcdweightXtalGroupsToken_
 

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 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

Definition at line 68 of file EcalTrivialObjectAnalyzer.h.

Constructor & Destructor Documentation

◆ EcalTrivialObjectAnalyzer()

EcalTrivialObjectAnalyzer::EcalTrivialObjectAnalyzer ( edm::ParameterSet const &  p)
explicit

Definition at line 24 of file EcalTrivialObjectAnalyzer.cc.

const edm::ESGetToken< EcalClusterEnergyUncertaintyParameters, EcalClusterEnergyUncertaintyParametersRcd > clusterEnergyUncertaintyToken_
const edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > laserAlphasToken_
const edm::ESGetToken< EcalClusterLocalContCorrParameters, EcalClusterLocalContCorrParametersRcd > clusterLocalContCorrToken_
const edm::ESGetToken< EcalIntercalibErrors, EcalIntercalibErrorsRcd > intercalibErrorsToken_
const edm::ESGetToken< EcalClusterCrackCorrParameters, EcalClusterCrackCorrParametersRcd > clusterCrackCorrToken_
const edm::ESGetToken< EcalClusterEnergyCorrectionParameters, EcalClusterEnergyCorrectionParametersRcd > clusterEnergyCorrectionToken_
const edm::ESGetToken< EcalClusterEnergyCorrectionObjectSpecificParameters, EcalClusterEnergyCorrectionObjectSpecificParametersRcd > clusterEnergyCorrectionObjectSpecificToken_
const edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_
const edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > timeCalibConstantsToken_
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > channelStatusToken_
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
const edm::ESGetToken< EcalTimeCalibErrors, EcalTimeCalibErrorsRcd > timeCalibErrorsToken_
const edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > laserAPDPNRatiosToken_
const edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > laserAPDPNRatiosRefToken_
const edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > weightXtalGroupsToken_
const edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcd > intercalibConstantsToken_
const edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > timeOffsetConstantToken_
const edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > tbWeightsToken_
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > gainRatiosToken_
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > adcToGevConstantToken_

◆ ~EcalTrivialObjectAnalyzer()

EcalTrivialObjectAnalyzer::~EcalTrivialObjectAnalyzer ( )
inlineoverride

Definition at line 71 of file EcalTrivialObjectAnalyzer.h.

71 {}

Member Function Documentation

◆ analyze()

void EcalTrivialObjectAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 46 of file EcalTrivialObjectAnalyzer.cc.

References adcToGevConstantToken_, channelStatusToken_, clusterCrackCorrToken_, clusterEnergyCorrectionObjectSpecificToken_, clusterEnergyCorrectionToken_, clusterEnergyUncertaintyToken_, clusterLocalContCorrToken_, visDQMUpload::context, MillePedeFileConverter_cfg::e, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), gainRatiosToken_, EcalChannelStatusCode::getStatusCode(), mps_fire::i, EcalXtalGroupId::id(), hcalRecHitTable_cff::ieta, createfilelist::int, intercalibConstantsToken_, intercalibErrorsToken_, hcalRecHitTable_cff::iphi, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, laserAlphasToken_, laserAPDPNRatiosRefToken_, laserAPDPNRatiosToken_, pedestalsToken_, diffTwoXMLs::r1, DetId::rawId(), sampleMaskToken_, tbWeightsToken_, timeCalibConstantsToken_, timeCalibErrorsToken_, timeOffsetConstantToken_, and weightXtalGroupsToken_.

46  {
47  using namespace edm::eventsetup;
48  // Context is not used.
49  edm::LogInfo(">>> EcalTrivialObjectAnalyzer: processing run ") << e.id().run() << " event: " << e.id().event();
50 
51  // ADC -> GeV Scale
52  const auto& agc = context.getData(adcToGevConstantToken_);
53  edm::LogInfo("Global ADC->GeV scale: EB ") << std::setprecision(6) << agc.getEBValue()
54  << " GeV/ADC count"
55  " EE "
56  << std::setprecision(6) << agc.getEEValue() << " GeV/ADC count";
57 
58  // use a channel to fetch values from DB
59  double r1 = (double)std::rand() / (double(RAND_MAX) + double(1));
60  int ieta = int(1 + r1 * 85);
61  r1 = (double)std::rand() / (double(RAND_MAX) + double(1));
62  int iphi = int(1 + r1 * 20);
63 
64  EBDetId ebid(ieta, iphi); //eta,phi
65  edm::LogInfo("EcalTrivialObjectAnalyzer: using EBDetId: ") << ebid;
66 
67  const auto& myped = context.getData(pedestalsToken_);
68  EcalPedestals::const_iterator it = myped.find(ebid.rawId());
69  if (it != myped.end()) {
70  edm::LogInfo("EcalPedestal: ") << " mean_x1: " << std::setprecision(8) << (*it).mean_x1
71  << " rms_x1: " << (*it).rms_x1 << " mean_x6: " << (*it).mean_x6
72  << " rms_x6: " << (*it).rms_x6 << " mean_x12: " << (*it).mean_x12
73  << " rms_x12: " << (*it).rms_x12;
74  } else {
75  edm::LogInfo("No pedestal found for this xtal! something wrong with EcalPedestals in your DB? ");
76  }
77 
78  // fetch map of groups of xtals
79  const auto& grp = context.getData(weightXtalGroupsToken_);
80 
81  EcalXtalGroupsMap::const_iterator git = grp.getMap().find(ebid.rawId());
82  EcalXtalGroupId gid;
83  if (git != grp.getMap().end()) {
84  edm::LogInfo("XtalGroupId.id() = ") << std::setprecision(3) << (*git).id();
85  gid = (*git);
86  } else {
87  edm::LogInfo("No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?");
88  }
89 
90  // Gain Ratios
91  const auto& gr = context.getData(gainRatiosToken_);
92 
93  EcalGainRatioMap::const_iterator grit = gr.getMap().find(ebid.rawId());
94  EcalMGPAGainRatio mgpa;
95  if (grit != gr.getMap().end()) {
96  mgpa = (*grit);
97 
98  edm::LogInfo("EcalMGPAGainRatio: ") << "gain 12/6 : " << std::setprecision(4) << mgpa.gain12Over6()
99  << " gain 6/1: " << mgpa.gain6Over1();
100  } else {
101  edm::LogInfo("No MGPA Gain Ratio found for this xtal! something wrong with EcalGainRatios in your DB? ");
102  }
103 
104  // Intercalib constants
105  const auto& ical = context.getData(intercalibConstantsToken_);
106 
107  EcalIntercalibConstantMap::const_iterator icalit = ical.getMap().find(ebid.rawId());
108  EcalIntercalibConstant icalconst;
109  if (icalit != ical.getMap().end()) {
110  icalconst = (*icalit);
111 
112  edm::LogInfo("EcalIntercalibConstant: ") << std::setprecision(6) << icalconst;
113  } else {
114  edm::LogInfo("No intercalib const found for this xtal! something wrong with EcalIntercalibConstants in your DB? ");
115  }
116 
117  // Intercalib errors
118  const auto& icalErr = context.getData(intercalibErrorsToken_);
119 
120  EcalIntercalibErrorMap::const_iterator icalitErr = icalErr.getMap().find(ebid.rawId());
121  EcalIntercalibError icalconstErr;
122  if (icalitErr != icalErr.getMap().end()) {
123  icalconstErr = (*icalitErr);
124 
125  edm::LogInfo("EcalIntercalibError: ") << std::setprecision(6) << icalconstErr;
126  } else {
127  edm::LogInfo("No intercalib const found for this xtal! something wrong with EcalIntercalibErrors in your DB? ");
128  }
129 
130  { // quick and dirty for cut and paste ;) it is a test program...
131  // TimeCalib constants
132  const auto& ical = context.getData(timeCalibConstantsToken_);
133 
134  EcalTimeCalibConstantMap::const_iterator icalit = ical.getMap().find(ebid.rawId());
135  EcalTimeCalibConstant icalconst;
136  if (icalit != ical.getMap().end()) {
137  icalconst = (*icalit);
138 
139  edm::LogInfo("EcalTimeCalibConstant: ") << std::setprecision(6) << icalconst;
140  } else {
141  edm::LogInfo("No intercalib const found for this xtal! something wrong with EcalTimeCalibConstants in your DB? ");
142  }
143 
144  // TimeCalib errors
145  const auto& icalErr = context.getData(timeCalibErrorsToken_);
146 
147  EcalTimeCalibErrorMap::const_iterator icalitErr = icalErr.getMap().find(ebid.rawId());
148  EcalTimeCalibError icalconstErr;
149  if (icalitErr != icalErr.getMap().end()) {
150  icalconstErr = (*icalitErr);
151 
152  edm::LogInfo("EcalTimeCalibError: ") << std::setprecision(6) << icalconstErr;
153  } else {
154  edm::LogInfo("No intercalib const found for this xtal! something wrong with EcalTimeCalibErrors in your DB? ");
155  }
156  }
157 
158  // fetch Time Offset
159  //std::cout <<"Fetching TimeOffsetConstant from DB " << std::endl;
160 
161  // Time Offset constants
162  const auto& TOff = context.getData(timeOffsetConstantToken_);
163 
164  edm::LogInfo("EcalTimeOffsetConstant: ") << " EB " << TOff.getEBValue() << " EE " << TOff.getEEValue();
165 
166  // fetch TB weights
167  edm::LogInfo("Fetching EcalTBWeights from DB ");
168  const auto& wgts = context.getData(tbWeightsToken_);
169  edm::LogInfo("EcalTBWeightMap.size(): ") << std::setprecision(3) << wgts.getMap().size();
170 
171  // look up the correct weights for this xtal
172  //EcalXtalGroupId gid( (*git) );
173  EcalTBWeights::EcalTDCId tdcid(1);
174 
175  edm::LogInfo("Lookup EcalWeightSet for groupid: ") << std::setprecision(3) << gid.id() << " and TDC id " << tdcid;
176  EcalTBWeights::EcalTBWeightMap::const_iterator wit = wgts.getMap().find(std::make_pair(gid, tdcid));
177  EcalWeightSet wset;
178  if (wit != wgts.getMap().end()) {
179  wset = wit->second;
180  edm::LogInfo("check size of data members in EcalWeightSet");
181  //wit->second.print(std::cout);
182 
183  //typedef std::vector< std::vector<EcalWeight> > EcalWeightMatrix;
184  const EcalWeightSet::EcalWeightMatrix& mat1 = wit->second.getWeightsBeforeGainSwitch();
185  const EcalWeightSet::EcalWeightMatrix& mat2 = wit->second.getWeightsAfterGainSwitch();
186 
187  // std::cout << "WeightsBeforeGainSwitch.size: " << mat1.size()
188  // << ", WeightsAfterGainSwitch.size: " << mat2.size() << std::endl;
189 
190  CLHEP::HepMatrix clmat1(3, 10, 0);
191  CLHEP::HepMatrix clmat2(3, 10, 0);
192  for (int irow = 0; irow < 3; irow++) {
193  for (int icol = 0; icol < 10; icol++) {
194  clmat1[irow][icol] = mat1(irow, icol);
195  clmat2[irow][icol] = mat2(irow, icol);
196  }
197  }
198  edm::LogInfo("weight matrix before gain switch:") << clmat1;
199  edm::LogInfo("weight matrix after gain switch:") << clmat2;
200 
201  } else {
202  edm::LogInfo("No weights found for EcalGroupId: ") << gid.id() << " and EcalTDCId: " << tdcid;
203  }
204 
205  // cluster functions/corrections
206  const auto& paramLocalCont = context.getData(clusterLocalContCorrToken_);
207  edm::LogInfo("LocalContCorrParameters:");
208  for (EcalFunctionParameters::const_iterator it = paramLocalCont.params().begin(); it != paramLocalCont.params().end();
209  ++it) {
210  // edm::LogInfo(" ") << *it;
211  }
212  // std::cout << "\n";
213  const auto& paramCrack = context.getData(clusterCrackCorrToken_);
214  edm::LogInfo("CrackCorrParameters:");
215  for (EcalFunctionParameters::const_iterator it = paramCrack.params().begin(); it != paramCrack.params().end(); ++it) {
216  // edm::LogInfo(" ") << *it;
217  }
218  // std::cout << "\n";
219  const auto& paramEnergyCorrection = context.getData(clusterEnergyCorrectionToken_);
220  edm::LogInfo("EnergyCorrectionParameters:");
221  for (EcalFunctionParameters::const_iterator it = paramEnergyCorrection.params().begin();
222  it != paramEnergyCorrection.params().end();
223  ++it) {
224  // edm::LogInfo(" ") << *it;
225  }
226  // std::cout << "\n";
227  const auto& paramEnergyUncertainty = context.getData(clusterEnergyUncertaintyToken_);
228  edm::LogInfo("EnergyCorrectionParameters:");
229  for (EcalFunctionParameters::const_iterator it = paramEnergyUncertainty.params().begin();
230  it != paramEnergyUncertainty.params().end();
231  ++it) {
232  // edm::LogInfo(" ") << *it;
233  }
234  // std::cout << "\n";
235  const auto& paramEnergyCorrectionObjectSpecific = context.getData(clusterEnergyCorrectionObjectSpecificToken_);
236  edm::LogInfo("EnergyCorrectionObjectSpecificParameters:");
237  for (EcalFunctionParameters::const_iterator it = paramEnergyCorrectionObjectSpecific.params().begin();
238  it != paramEnergyCorrectionObjectSpecific.params().end();
239  ++it) {
240  // edm::LogInfo(" ") << *it;
241  }
242  // std::cout << "\n";
243 
244  // laser correction
245 
246  // laser alphas
247  const auto& lalpha = context.getData(laserAlphasToken_);
248 
250  lalphait = lalpha.getMap().find(ebid.rawId());
251  if (lalphait != lalpha.getMap().end()) {
252  edm::LogInfo("EcalLaserAlpha: ") << std::setprecision(6) << (*lalphait);
253  } else {
254  edm::LogInfo("No laser alpha found for this xtal! something wrong with EcalLaserAlphas in your DB? ");
255  }
256 
257  // laser apdpnref
258  const auto& lref = context.getData(laserAPDPNRatiosRefToken_);
259 
261  lrefit = lref.getMap().find(ebid.rawId());
262  if (lrefit != lref.getMap().end()) {
263  // edm::LogInfo("EcalLaserAPDPNRatiosRef: ")
264  // <<std::setprecision(6)
265  // << (*lrefit)
266  ;
267  } else {
268  edm::LogInfo("No laser apd/pn ref found for this xtal! something wrong with EcalLaserAPDPNRatiosRef in your DB? ");
269  }
270 
271  // laser apdpn ratios
272  const auto& lratio = context.getData(laserAPDPNRatiosToken_);
273 
275  lratioit = lratio.getLaserMap().find(ebid.rawId());
277 
278  if (lratioit != lratio.getLaserMap().end()) {
279  lratioconst = (*lratioit);
280 
281  // edm::LogInfo("EcalLaserAPDPNRatios: ")
282  // <<e.id().run() << " " << e.id().event() << " "
283  // << std::setprecision(6)
284  // << lratioconst.p1 << " " << lratioconst.p2
285  ;
286  } else {
287  edm::LogInfo("No laser apd/pn ratio found for this xtal! something wrong with EcalLaserAPDPNRatios in your DB? ");
288  }
289 
290  // laser timestamps
292  // EcalLaserAPDPNRatios::EcalLaserTimeStampMap::const_iterator ltimeit;
293  for (int i = 1; i <= 92; i++) {
294  ltimestamp = lratio.getTimeMap()[i];
295  // edm::LogInfo("i = ") << std::setprecision(6) << i
296  // << ltimestamp.t1.value() << " " << ltimestamp.t2.value() << " : " ;
297  }
298  // edm::LogInfo("Tests finished.");
299 
300  // channel status
301  const auto& ch_status = context.getData(channelStatusToken_);
302 
304  chit = ch_status.getMap().find(ebid.rawId());
305  if (chit != ch_status.getMap().end()) {
306  EcalChannelStatusCode ch_code = (*chit);
307  edm::LogInfo("EcalChannelStatus: ") << std::setprecision(6) << ch_code.getStatusCode();
308  } else {
309  edm::LogInfo("No channel status found for this xtal! something wrong with EcalChannelStatus in your DB? ");
310  }
311 
312  // laser transparency correction
313 
314  // Mask to ignore sample
315  const auto& smask = context.getData(sampleMaskToken_);
316  edm::LogInfo("Sample Mask EB ") << std::hex << smask.getEcalSampleMaskRecordEB() << " EE " << std::hex
317  << smask.getEcalSampleMaskRecordEE();
318 
319  /*
320  std::cout << "make CLHEP matrices from vector<vector<Ecalweight>>" << std::endl;
321  CLHEP::HepMatrix clmat1(3,8,0);
322  CLHEP::HepMatrix clmat2(3,8,0);
323  for(int irow=0; irow<3; irow++) {
324  for(int icol=0; icol<8; icol++) {
325  clmat1[irow][icol] = (mat1[irow])[icol]();
326  clmat2[irow][icol] = (mat2[irow])[icol]();
327  }
328  }
329  std::cout << clmat1 << std::endl;
330  std::cout << clmat2 << std::endl;
331 */
332 
333 } //end of ::Analyze()
const edm::ESGetToken< EcalClusterEnergyUncertaintyParameters, EcalClusterEnergyUncertaintyParametersRcd > clusterEnergyUncertaintyToken_
const edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > laserAlphasToken_
const edm::ESGetToken< EcalClusterLocalContCorrParameters, EcalClusterLocalContCorrParametersRcd > clusterLocalContCorrToken_
const edm::ESGetToken< EcalIntercalibErrors, EcalIntercalibErrorsRcd > intercalibErrorsToken_
const edm::ESGetToken< EcalClusterCrackCorrParameters, EcalClusterCrackCorrParametersRcd > clusterCrackCorrToken_
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
float EcalTimeCalibError
const edm::ESGetToken< EcalClusterEnergyCorrectionParameters, EcalClusterEnergyCorrectionParametersRcd > clusterEnergyCorrectionToken_
const edm::ESGetToken< EcalClusterEnergyCorrectionObjectSpecificParameters, EcalClusterEnergyCorrectionObjectSpecificParametersRcd > clusterEnergyCorrectionObjectSpecificToken_
const edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_
const edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > timeCalibConstantsToken_
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > channelStatusToken_
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
unsigned int id() const
const edm::ESGetToken< EcalTimeCalibErrors, EcalTimeCalibErrorsRcd > timeCalibErrorsToken_
float EcalIntercalibError
const edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > laserAPDPNRatiosToken_
const edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > laserAPDPNRatiosRefToken_
Log< level::Info, false > LogInfo
float gain12Over6() const
const edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > weightXtalGroupsToken_
const edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcd > intercalibConstantsToken_
const edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > timeOffsetConstantToken_
std::vector< Item >::const_iterator const_iterator
const edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > tbWeightsToken_
float gain6Over1() const
float EcalTimeCalibConstant
Code getStatusCode() const
return decoded status
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > gainRatiosToken_
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > adcToGevConstantToken_
float EcalIntercalibConstant

Member Data Documentation

◆ adcToGevConstantToken_

const edm::ESGetToken<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> EcalTrivialObjectAnalyzer::adcToGevConstantToken_
private

Definition at line 76 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ channelStatusToken_

const edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> EcalTrivialObjectAnalyzer::channelStatusToken_
private

Definition at line 98 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ clusterCrackCorrToken_

const edm::ESGetToken<EcalClusterCrackCorrParameters, EcalClusterCrackCorrParametersRcd> EcalTrivialObjectAnalyzer::clusterCrackCorrToken_
private

Definition at line 87 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ clusterEnergyCorrectionObjectSpecificToken_

const edm::ESGetToken<EcalClusterEnergyCorrectionObjectSpecificParameters, EcalClusterEnergyCorrectionObjectSpecificParametersRcd> EcalTrivialObjectAnalyzer::clusterEnergyCorrectionObjectSpecificToken_
private

Definition at line 94 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ clusterEnergyCorrectionToken_

const edm::ESGetToken<EcalClusterEnergyCorrectionParameters, EcalClusterEnergyCorrectionParametersRcd> EcalTrivialObjectAnalyzer::clusterEnergyCorrectionToken_
private

Definition at line 89 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ clusterEnergyUncertaintyToken_

const edm::ESGetToken<EcalClusterEnergyUncertaintyParameters, EcalClusterEnergyUncertaintyParametersRcd> EcalTrivialObjectAnalyzer::clusterEnergyUncertaintyToken_
private

Definition at line 91 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ clusterLocalContCorrToken_

const edm::ESGetToken<EcalClusterLocalContCorrParameters, EcalClusterLocalContCorrParametersRcd> EcalTrivialObjectAnalyzer::clusterLocalContCorrToken_
private

Definition at line 86 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ gainRatiosToken_

const edm::ESGetToken<EcalGainRatios, EcalGainRatiosRcd> EcalTrivialObjectAnalyzer::gainRatiosToken_
private

Definition at line 78 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ intercalibConstantsToken_

const edm::ESGetToken<EcalIntercalibConstants, EcalIntercalibConstantsRcd> EcalTrivialObjectAnalyzer::intercalibConstantsToken_
private

Definition at line 79 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ intercalibErrorsToken_

const edm::ESGetToken<EcalIntercalibErrors, EcalIntercalibErrorsRcd> EcalTrivialObjectAnalyzer::intercalibErrorsToken_
private

Definition at line 80 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ laserAlphasToken_

const edm::ESGetToken<EcalLaserAlphas, EcalLaserAlphasRcd> EcalTrivialObjectAnalyzer::laserAlphasToken_
private

Definition at line 95 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ laserAPDPNRatiosRefToken_

const edm::ESGetToken<EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd> EcalTrivialObjectAnalyzer::laserAPDPNRatiosRefToken_
private

Definition at line 96 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ laserAPDPNRatiosToken_

const edm::ESGetToken<EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd> EcalTrivialObjectAnalyzer::laserAPDPNRatiosToken_
private

Definition at line 97 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ pedestalsToken_

const edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> EcalTrivialObjectAnalyzer::pedestalsToken_
private

Definition at line 75 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ sampleMaskToken_

const edm::ESGetToken<EcalSampleMask, EcalSampleMaskRcd> EcalTrivialObjectAnalyzer::sampleMaskToken_
private

Definition at line 99 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ tbWeightsToken_

const edm::ESGetToken<EcalTBWeights, EcalTBWeightsRcd> EcalTrivialObjectAnalyzer::tbWeightsToken_
private

Definition at line 84 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ timeCalibConstantsToken_

const edm::ESGetToken<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd> EcalTrivialObjectAnalyzer::timeCalibConstantsToken_
private

Definition at line 81 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ timeCalibErrorsToken_

const edm::ESGetToken<EcalTimeCalibErrors, EcalTimeCalibErrorsRcd> EcalTrivialObjectAnalyzer::timeCalibErrorsToken_
private

Definition at line 82 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ timeOffsetConstantToken_

const edm::ESGetToken<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd> EcalTrivialObjectAnalyzer::timeOffsetConstantToken_
private

Definition at line 83 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().

◆ weightXtalGroupsToken_

const edm::ESGetToken<EcalWeightXtalGroups, EcalWeightXtalGroupsRcd> EcalTrivialObjectAnalyzer::weightXtalGroupsToken_
private

Definition at line 77 of file EcalTrivialObjectAnalyzer.h.

Referenced by analyze().