CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Attributes
EcalBarrelDigisValidation Class Reference

#include <EcalBarrelDigisValidation.h>

Inheritance diagram for EcalBarrelDigisValidation:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 EcalBarrelDigisValidation (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~EcalBarrelDigisValidation () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () 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
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c) override
 Analyze. More...
 
void checkCalibrations (edm::EventSetup const &c)
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename 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)
 

Private Types

typedef std::map< uint32_t, float, std::less< uint32_t > > MapType
 

Private Attributes

double barrelADCtoGeV_
 
edm::EDGetTokenT< EBDigiCollectionEBdigiCollection_
 
double endcapADCtoGeV_
 
std::map< int, double, std::less< int > > gainConv_
 
MonitorElementmeEBDigiADCAnalog_ [10]
 
MonitorElementmeEBDigiADCg12_ [10]
 
MonitorElementmeEBDigiADCg1_ [10]
 
MonitorElementmeEBDigiADCg6_ [10]
 
MonitorElementmeEBDigiADCGlobal_
 
MonitorElementmeEBDigiADCgS_ [10]
 
MonitorElementmeEBDigiGain_ [10]
 
MonitorElementmeEBDigiMultiplicity_
 
MonitorElementmeEBDigiOccupancy_
 
MonitorElementmeEBMaximumgt100ADC_
 
MonitorElementmeEBMaximumgt10ADC_
 
MonitorElementmeEBnADCafterSwitch_
 
MonitorElementmeEBPedestal_
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 36 of file EcalBarrelDigisValidation.h.

Member Typedef Documentation

typedef std::map<uint32_t,float,std::less<uint32_t> > EcalBarrelDigisValidation::MapType
private

Definition at line 38 of file EcalBarrelDigisValidation.h.

Constructor & Destructor Documentation

EcalBarrelDigisValidation::EcalBarrelDigisValidation ( const edm::ParameterSet ps)

Constructor.

Definition at line 16 of file EcalBarrelDigisValidation.cc.

References barrelADCtoGeV_, endcapADCtoGeV_, gainConv_, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, meEBDigiADCAnalog_, meEBDigiADCg12_, meEBDigiADCg1_, meEBDigiADCg6_, meEBDigiADCGlobal_, meEBDigiADCgS_, meEBDigiGain_, meEBDigiMultiplicity_, meEBDigiOccupancy_, meEBMaximumgt100ADC_, meEBMaximumgt10ADC_, meEBnADCafterSwitch_, meEBPedestal_, and verbose_.

16  :
17  EBdigiCollection_(consumes<EBDigiCollection>(ps.getParameter<edm::InputTag>("EBdigiCollection")))
18 {
19 
20  // verbosity switch
21  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
22 
23 
24  // get hold of back-end interface
25 
26 
27  gainConv_[1] = 1.;
28  gainConv_[2] = 2.;
29  gainConv_[3] = 12.;
30  gainConv_[0] = 12.; // saturated channels
31  barrelADCtoGeV_ = 0.035;
32  endcapADCtoGeV_ = 0.06;
33 
34  meEBDigiOccupancy_ = nullptr;
35 
36  meEBDigiMultiplicity_ = nullptr;
37 
38  meEBDigiADCGlobal_ = nullptr;
39 
40  for (int i = 0; i < 10 ; i++ ) {
41  meEBDigiADCAnalog_[i] = nullptr;
42  meEBDigiADCgS_[i] = nullptr;
43  meEBDigiADCg1_[i] = nullptr;
44  meEBDigiADCg6_[i] = nullptr;
45  meEBDigiADCg12_[i] = nullptr;
46  meEBDigiGain_[i] = nullptr;
47  }
48 
49  meEBPedestal_ = nullptr;
50 
51  meEBMaximumgt100ADC_ = nullptr;
52 
53  meEBMaximumgt10ADC_ = nullptr;
54 
55  meEBnADCafterSwitch_ = nullptr;
56 
57 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::map< int, double, std::less< int > > gainConv_
MonitorElement * meEBDigiADCAnalog_[10]
edm::EDGetTokenT< EBDigiCollection > EBdigiCollection_
MonitorElement * meEBDigiADCg12_[10]
EcalBarrelDigisValidation::~EcalBarrelDigisValidation ( )
override

Destructor.

Definition at line 59 of file EcalBarrelDigisValidation.cc.

59  {
60 
61 }

Member Function Documentation

void EcalBarrelDigisValidation::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Analyze.

Reimplemented from DQMEDAnalyzer.

Definition at line 121 of file EcalBarrelDigisValidation.cc.

References EcalMGPASample::adc(), barrelADCtoGeV_, EBdigiCollection_, MonitorElement::Fill(), gainConv_, EcalMGPASample::gainId(), edm::Event::getByToken(), mps_fire::i, EBDataFrame::id(), EBDetId::ieta(), createfilelist::int, EBDetId::iphi(), edm::HandleBase::isValid(), LogDebug, EcalDataFrame::MAXSAMPLES, meEBDigiADCAnalog_, meEBDigiADCg12_, meEBDigiADCg1_, meEBDigiADCg6_, meEBDigiADCGlobal_, meEBDigiADCgS_, meEBDigiGain_, meEBDigiMultiplicity_, meEBDigiOccupancy_, meEBMaximumgt100ADC_, meEBMaximumgt10ADC_, meEBnADCafterSwitch_, meEBPedestal_, dataAnalyzerFineBiningParameters_cff::Pmax, edm::Handle< T >::product(), DetId::rawId(), edm::DataFrameContainer::reserve(), simplePhotonAnalyzer_cfi::sample, EcalDataFrame::size(), and edm::DataFrameContainer::size().

121  {
122 
123  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
124 
125  Handle<EBDigiCollection> EcalDigiEB;
126 
127  e.getByToken( EBdigiCollection_ , EcalDigiEB );
128 
129  //Return if no Barrel data
130  if( !EcalDigiEB.isValid() ) return;
131 
132  // BARREL
133 
134  // loop over Digis
135 
136  const EBDigiCollection * barrelDigi = EcalDigiEB.product () ;
137 
138  std::vector<double> ebAnalogSignal ;
139  std::vector<double> ebADCCounts ;
140  std::vector<double> ebADCGains ;
141  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
142  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
143  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
144 
145  int nDigis = 0;
146 
147  for (unsigned int digis=0; digis<EcalDigiEB->size(); ++digis)
148  {
149 
150  EBDataFrame ebdf = (*barrelDigi)[digis];
151  int nrSamples = ebdf.size();
152 
153  EBDetId ebid = ebdf.id () ;
154 
155  nDigis++;
156  if (meEBDigiOccupancy_) meEBDigiOccupancy_->Fill( ebid.iphi(), ebid.ieta() );
157 
158  double Emax = 0. ;
159  int Pmax = 0 ;
160  double pedestalPreSample = 0.;
161  double pedestalPreSampleAnalog = 0.;
162  int countsAfterGainSwitch = -1;
163  double higherGain = 1.;
164  int higherGainSample = 0;
165 
166  for (int sample = 0 ; sample < nrSamples; ++sample) {
167  ebAnalogSignal[sample] = 0.;
168  ebADCCounts[sample] = 0.;
169  ebADCGains[sample] = 0.;
170  }
171 
172  for (int sample = 0 ; sample < nrSamples; ++sample)
173  {
174  EcalMGPASample thisSample = ebdf[sample];
175 
176  ebADCCounts[sample] = (thisSample.adc());
177  ebADCGains[sample] = (thisSample.gainId());
178  ebAnalogSignal[sample] = (ebADCCounts[sample]*gainConv_[(int)ebADCGains[sample]]*barrelADCtoGeV_);
179 
180  if (Emax < ebAnalogSignal[sample] ) {
181  Emax = ebAnalogSignal[sample] ;
182  Pmax = sample ;
183  }
184 
185  if ( sample < 3 ) {
186  pedestalPreSample += ebADCCounts[sample] ;
187  pedestalPreSampleAnalog += ebADCCounts[sample]*gainConv_[(int)ebADCGains[sample]]*barrelADCtoGeV_ ;
188  }
189 
190  if ( sample > 0 && ( ((ebADCGains[sample] > ebADCGains[sample-1]) && (ebADCGains[sample-1]!=0)) || (countsAfterGainSwitch<0 && ebADCGains[sample]==0)) ) {
191  higherGain = ebADCGains[sample];
192  higherGainSample = sample;
193  countsAfterGainSwitch = 1;
194  }
195 
196  if ( (higherGain > 1 && (higherGainSample != sample) && (ebADCGains[sample] == higherGain)) || (higherGain==3 && (higherGainSample != sample) && (ebADCGains[sample]==0)) || (higherGain==0 && (higherGainSample != sample) && ((ebADCGains[sample] == 3) || (ebADCGains[sample]==0))) ) { countsAfterGainSwitch++ ; }
197  }
198 
199  pedestalPreSample /= 3. ;
200  pedestalPreSampleAnalog /= 3. ;
201 
202  LogDebug("DigiInfo") << "Barrel Digi for EBDetId = " << ebid.rawId() << " eta,phi " << ebid.ieta() << " " << ebid.iphi() ;
203  for ( int i = 0; i < 10 ; i++ ) {
204  LogDebug("DigiInfo") << "sample " << i << " ADC = " << ebADCCounts[i] << " gain = " << ebADCGains[i] << " Analog = " << ebAnalogSignal[i];
205  }
206  LogDebug("DigiInfo") << "Maximum energy = " << Emax << " in sample " << Pmax << " Pedestal from pre-sample = " << pedestalPreSampleAnalog;
207  if ( countsAfterGainSwitch > 0 ) LogDebug("DigiInfo") << "Counts after switch " << countsAfterGainSwitch;
208 
209  if ( countsAfterGainSwitch > 0 && countsAfterGainSwitch < 5 ) {
210  edm::LogWarning("DigiWarning") << "Wrong number of counts after gain switch before next switch! " << countsAfterGainSwitch ;
211  for ( int i = 0; i < 10 ; i++ ) {
212  edm::LogWarning("DigiWarning") << "sample " << i << " ADC = " << ebADCCounts[i] << " gain = " << ebADCGains[i] << " Analog = " << ebAnalogSignal[i];
213  }
214  }
215 
216  for ( int i = 0 ; i < 10 ; i++ ) {
217  if (meEBDigiADCGlobal_ && (Emax-pedestalPreSampleAnalog*gainConv_[(int)ebADCGains[Pmax]]) > 100.*barrelADCtoGeV_) meEBDigiADCGlobal_->Fill( i , ebAnalogSignal[i] ) ;
218  if (meEBDigiADCAnalog_[i]) meEBDigiADCAnalog_[i]->Fill( ebAnalogSignal[i] ) ;
219 
220  if ( ebADCGains[i] == 0) {
221  if (meEBDigiADCgS_[i]) meEBDigiADCgS_[i]->Fill( ebADCCounts[i] ) ;
222  }
223  else if ( ebADCGains[i] == 3 ) {
224  if (meEBDigiADCg1_[i]) meEBDigiADCg1_[i]->Fill( ebADCCounts[i] ) ;
225  }
226  else if ( ebADCGains[i] == 2 ) {
227  if (meEBDigiADCg6_[i]) meEBDigiADCg6_[i]->Fill( ebADCCounts[i] ) ;
228  }
229  else if ( ebADCGains[i] == 1 ) {
230  if (meEBDigiADCg12_[i]) meEBDigiADCg12_[i]->Fill( ebADCCounts[i] ) ;
231  }
232  if (meEBDigiGain_[i]) meEBDigiGain_[i]->Fill( ebADCGains[i] ) ;
233  }
234 
235  if (meEBPedestal_) meEBPedestal_->Fill ( pedestalPreSample ) ;
236  if (meEBMaximumgt10ADC_ && (Emax-pedestalPreSampleAnalog*gainConv_[(int)ebADCGains[Pmax]]) > 10.*barrelADCtoGeV_) meEBMaximumgt10ADC_->Fill( Pmax ) ;
237  if (meEBMaximumgt100ADC_ && (Emax-pedestalPreSampleAnalog*gainConv_[(int)ebADCGains[Pmax]]) > 100.*barrelADCtoGeV_) meEBMaximumgt100ADC_->Fill( Pmax ) ;
238  if (meEBnADCafterSwitch_) meEBnADCafterSwitch_->Fill( countsAfterGainSwitch ) ;
239 
240  }
241 
243 
244 }
#define LogDebug(id)
std::map< int, double, std::less< int > > gainConv_
key_type id() const
Definition: EBDataFrame.h:31
MonitorElement * meEBDigiADCAnalog_[10]
int gainId() const
get the gainId (2 bits)
int size() const
Definition: EcalDataFrame.h:26
void Fill(long long x)
int iphi() const
get the crystal iphi
Definition: EBDetId.h:53
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
edm::EDGetTokenT< EBDigiCollection > EBdigiCollection_
int ieta() const
get the crystal ieta
Definition: EBDetId.h:51
bool isValid() const
Definition: HandleBase.h:74
void reserve(size_t isize)
T const * product() const
Definition: Handle.h:81
MonitorElement * meEBDigiADCg12_[10]
static const int MAXSAMPLES
Definition: EcalDataFrame.h:48
int adc() const
get the ADC sample (12 bits)
void EcalBarrelDigisValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 63 of file EcalBarrelDigisValidation.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), trackerHits::histo, mps_fire::i, meEBDigiADCAnalog_, meEBDigiADCg12_, meEBDigiADCg1_, meEBDigiADCg6_, meEBDigiADCGlobal_, meEBDigiADCgS_, meEBDigiGain_, meEBDigiMultiplicity_, meEBDigiOccupancy_, meEBMaximumgt100ADC_, meEBMaximumgt10ADC_, meEBnADCafterSwitch_, meEBPedestal_, and DQMStore::IBooker::setCurrentFolder().

63  {
64 
65  Char_t histo[200];
66 
67  ibooker.setCurrentFolder("EcalDigisV/EcalDigiTask");
68 
69  sprintf (histo, "EcalDigiTask Barrel occupancy" ) ;
70  meEBDigiOccupancy_ = ibooker.book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
71 
72  sprintf (histo, "EcalDigiTask Barrel digis multiplicity" ) ;
73  meEBDigiMultiplicity_ = ibooker.book1D(histo, histo, 612, 0., 61200);
74 
75  sprintf (histo, "EcalDigiTask Barrel global pulse shape" ) ;
76  meEBDigiADCGlobal_ = ibooker.bookProfile(histo, histo, 10, 0, 10, 10000, 0., 1000.) ;
77 
78  for (int i = 0; i < 10 ; i++ ) {
79 
80  sprintf (histo, "EcalDigiTask Barrel analog pulse %02d", i+1) ;
81  meEBDigiADCAnalog_[i] = ibooker.book1D(histo, histo, 4000, 0., 400.);
82 
83  sprintf (histo, "EcalDigiTask Barrel ADC pulse %02d Gain 0 - Saturated", i+1) ;
84  meEBDigiADCgS_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
85 
86  sprintf (histo, "EcalDigiTask Barrel ADC pulse %02d Gain 1", i+1) ;
87  meEBDigiADCg1_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
88 
89  sprintf (histo, "EcalDigiTask Barrel ADC pulse %02d Gain 6", i+1) ;
90  meEBDigiADCg6_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
91 
92  sprintf (histo, "EcalDigiTask Barrel ADC pulse %02d Gain 12", i+1) ;
93  meEBDigiADCg12_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
94 
95  sprintf (histo, "EcalDigiTask Barrel gain pulse %02d", i+1) ;
96  meEBDigiGain_[i] = ibooker.book1D(histo, histo, 4, 0, 4);
97 
98  }
99 
100  sprintf (histo, "EcalDigiTask Barrel pedestal for pre-sample" ) ;
101  meEBPedestal_ = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5) ;
102 
103  sprintf (histo, "EcalDigiTask Barrel maximum position gt 100 ADC" ) ;
104  meEBMaximumgt100ADC_ = ibooker.book1D(histo, histo, 10, 0., 10.) ;
105 
106  sprintf (histo, "EcalDigiTask Barrel maximum position gt 10 ADC" ) ;
107  meEBMaximumgt10ADC_ = ibooker.book1D(histo, histo, 10, 0., 10.) ;
108 
109  sprintf (histo, "EcalDigiTask Barrel ADC counts after gain switch" ) ;
110  meEBnADCafterSwitch_ = ibooker.book1D(histo, histo, 10, 0., 10.) ;
111 
112 }
MonitorElement * meEBDigiADCAnalog_[10]
MonitorElement * meEBDigiADCg12_[10]
void EcalBarrelDigisValidation::checkCalibrations ( edm::EventSetup const &  c)
protected

Definition at line 246 of file EcalBarrelDigisValidation.cc.

References barrelADCtoGeV_, endcapADCtoGeV_, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), gainConv_, edm::EventSetup::get(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), LogDebug, and edm::ESHandle< T >::product().

Referenced by dqmBeginRun().

247  {
248 
249  // ADC -> GeV Scale
251  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
252  const EcalADCToGeVConstant* agc = pAgc.product();
253 
254  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
255 
256  gainConv_[1] = 1.;
257  gainConv_[2] = defaultRatios->gain12Over6() ;
258  gainConv_[3] = gainConv_[2]*(defaultRatios->gain6Over1()) ;
259  gainConv_[0] = gainConv_[2]*(defaultRatios->gain6Over1()) ;
260 
261  LogDebug("EcalDigi") << " Gains conversions: " << "\n" << " g0 = " << gainConv_[0] << "\n" << " g1 = " << gainConv_[1] << "\n" << " g2 = " << gainConv_[2] << "\n" << " g3 = " << gainConv_[3];
262 
263  delete defaultRatios;
264 
265  const double barrelADCtoGeV_ = agc->getEBValue();
266  LogDebug("EcalDigi") << " Barrel GeV/ADC = " << barrelADCtoGeV_;
267  const double endcapADCtoGeV_ = agc->getEEValue();
268  LogDebug("EcalDigi") << " Endcap GeV/ADC = " << endcapADCtoGeV_;
269 
270 }
#define LogDebug(id)
std::map< int, double, std::less< int > > gainConv_
float gain6Over1() const
float gain12Over6() const
T const * product() const
Definition: ESHandle.h:86
void EcalBarrelDigisValidation::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 114 of file EcalBarrelDigisValidation.cc.

References checkCalibrations().

114  {
115 
117 
118 }
void checkCalibrations(edm::EventSetup const &c)

Member Data Documentation

double EcalBarrelDigisValidation::barrelADCtoGeV_
private
edm::EDGetTokenT<EBDigiCollection> EcalBarrelDigisValidation::EBdigiCollection_
private

Definition at line 64 of file EcalBarrelDigisValidation.h.

Referenced by analyze().

double EcalBarrelDigisValidation::endcapADCtoGeV_
private

Definition at line 69 of file EcalBarrelDigisValidation.h.

Referenced by checkCalibrations(), and EcalBarrelDigisValidation().

std::map<int, double, std::less<int> > EcalBarrelDigisValidation::gainConv_
private
MonitorElement* EcalBarrelDigisValidation::meEBDigiADCAnalog_[10]
private

Definition at line 77 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiADCg12_[10]
private

Definition at line 82 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiADCg1_[10]
private

Definition at line 80 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiADCg6_[10]
private

Definition at line 81 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiADCGlobal_
private

Definition at line 75 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiADCgS_[10]
private

Definition at line 79 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiGain_[10]
private

Definition at line 84 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiMultiplicity_
private

Definition at line 73 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBDigiOccupancy_
private

Definition at line 71 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBMaximumgt100ADC_
private

Definition at line 88 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBMaximumgt10ADC_
private

Definition at line 90 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBnADCafterSwitch_
private

Definition at line 92 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

MonitorElement* EcalBarrelDigisValidation::meEBPedestal_
private

Definition at line 86 of file EcalBarrelDigisValidation.h.

Referenced by analyze(), bookHistograms(), and EcalBarrelDigisValidation().

std::string EcalBarrelDigisValidation::outputFile_
private

Definition at line 62 of file EcalBarrelDigisValidation.h.

bool EcalBarrelDigisValidation::verbose_
private

Definition at line 60 of file EcalBarrelDigisValidation.h.

Referenced by EcalBarrelDigisValidation().