CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Attributes
EcalEndcapDigisValidation Class Reference

#include <EcalEndcapDigisValidation.h>

Inheritance diagram for EcalEndcapDigisValidation:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 EcalEndcapDigisValidation (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~EcalEndcapDigisValidation ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c)
 Analyze. More...
 
void checkCalibrations (edm::EventSetup const &c)
 
- 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
< EEDigiCollection
EEdigiCollectionToken_
 
double endcapADCtoGeV_
 
std::map< int, double,
std::less< int > > 
gainConv_
 
MonitorElementmeEEDigiADCAnalog_ [10]
 
MonitorElementmeEEDigiADCg12_ [10]
 
MonitorElementmeEEDigiADCg1_ [10]
 
MonitorElementmeEEDigiADCg6_ [10]
 
MonitorElementmeEEDigiADCGlobal_
 
MonitorElementmeEEDigiADCgS_ [10]
 
MonitorElementmeEEDigiGain_ [10]
 
MonitorElementmeEEDigiMultiplicityzm_
 
MonitorElementmeEEDigiMultiplicityzp_
 
MonitorElementmeEEDigiOccupancyzm_
 
MonitorElementmeEEDigiOccupancyzp_
 
MonitorElementmeEEMaximumgt100ADC_
 
MonitorElementmeEEMaximumgt20ADC_
 
MonitorElementmeEEnADCafterSwitch_
 
MonitorElementmeEEPedestal_
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 35 of file EcalEndcapDigisValidation.h.

Member Typedef Documentation

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

Definition at line 37 of file EcalEndcapDigisValidation.h.

Constructor & Destructor Documentation

EcalEndcapDigisValidation::EcalEndcapDigisValidation ( const edm::ParameterSet ps)

Constructor.

Definition at line 15 of file EcalEndcapDigisValidation.cc.

References barrelADCtoGeV_, endcapADCtoGeV_, gainConv_, edm::ParameterSet::getUntrackedParameter(), i, meEEDigiADCAnalog_, meEEDigiADCg12_, meEEDigiADCg1_, meEEDigiADCg6_, meEEDigiADCGlobal_, meEEDigiADCgS_, meEEDigiGain_, meEEDigiMultiplicityzm_, meEEDigiMultiplicityzp_, meEEDigiOccupancyzm_, meEEDigiOccupancyzp_, meEEMaximumgt100ADC_, meEEMaximumgt20ADC_, meEEnADCafterSwitch_, meEEPedestal_, and verbose_.

15  :
16  EEdigiCollectionToken_(consumes<EEDigiCollection>(ps.getParameter<edm::InputTag>("EEdigiCollection")))
17  {
18 
19  // verbosity switch
20  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
21 
22  gainConv_[1] = 1.;
23  gainConv_[2] = 2.;
24  gainConv_[3] = 12.;
25  gainConv_[0] = 12.; // saturated channels
26  barrelADCtoGeV_ = 0.035;
27  endcapADCtoGeV_ = 0.06;
28 
31 
34 
36 
37  for (int i = 0; i < 10 ; i++ ) {
38  meEEDigiADCAnalog_[i] = 0;
39  meEEDigiADCgS_[i] = 0;
40  meEEDigiADCg1_[i] = 0;
41  meEEDigiADCg6_[i] = 0;
42  meEEDigiADCg12_[i] = 0;
43  meEEDigiGain_[i] = 0;
44  }
45 
46  meEEPedestal_ = 0;
47 
49 
51 
53 
54 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEEDigiADCAnalog_[10]
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
MonitorElement * meEEDigiADCg12_[10]
std::map< int, double, std::less< int > > gainConv_
EcalEndcapDigisValidation::~EcalEndcapDigisValidation ( )

Destructor.

Definition at line 56 of file EcalEndcapDigisValidation.cc.

56  {
57 
58 }

Member Function Documentation

void EcalEndcapDigisValidation::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
protectedvirtual

Analyze.

Implements edm::stream::EDAnalyzerBase.

Definition at line 123 of file EcalEndcapDigisValidation.cc.

References EcalMGPASample::adc(), EEdigiCollectionToken_, endcapADCtoGeV_, MonitorElement::Fill(), gainConv_, EcalMGPASample::gainId(), edm::Event::getByToken(), i, EEDataFrame::id(), edm::HandleBase::isValid(), EEDetId::ix(), EEDetId::iy(), LogDebug, EcalDataFrame::MAXSAMPLES, meEEDigiADCAnalog_, meEEDigiADCg12_, meEEDigiADCg1_, meEEDigiADCg6_, meEEDigiADCGlobal_, meEEDigiADCgS_, meEEDigiGain_, meEEDigiMultiplicityzm_, meEEDigiMultiplicityzp_, meEEDigiOccupancyzm_, meEEDigiOccupancyzp_, meEEMaximumgt100ADC_, meEEMaximumgt20ADC_, meEEnADCafterSwitch_, meEEPedestal_, ecalTB2006H4_GenSimDigiReco_cfg::mySample, edm::Handle< T >::product(), DetId::rawId(), compare_using_db::sample, EcalDataFrame::size(), and EEDetId::zside().

123  {
124 
125  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
126 
127  Handle<EEDigiCollection> EcalDigiEE;
128 
129  e.getByToken( EEdigiCollectionToken_ , EcalDigiEE );
130 
131  // Return if no Endcap data available
132  if( !EcalDigiEE.isValid() ) return;
133 
134  // ENDCAP
135 
136  // loop over Digis
137 
138  const EEDigiCollection * endcapDigi = EcalDigiEE.product () ;
139 
140  std::vector<double> eeAnalogSignal ;
141  std::vector<double> eeADCCounts ;
142  std::vector<double> eeADCGains ;
143  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
144  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
145  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
146 
147  int nDigiszp = 0;
148  int nDigiszm = 0;
149 
150  for (unsigned int digis=0; digis<EcalDigiEE->size(); ++digis) {
151 
152  EEDataFrame eedf=(*endcapDigi)[digis];
153  int nrSamples=eedf.size();
154 
155  EEDetId eeid = eedf.id () ;
156 
157  if (eeid.zside() > 0 ) {
158  if (meEEDigiOccupancyzp_) meEEDigiOccupancyzp_->Fill( eeid.ix(), eeid.iy() );
159  nDigiszp++;
160  }
161  else if (eeid.zside() < 0 ) {
162  if (meEEDigiOccupancyzm_) meEEDigiOccupancyzm_->Fill( eeid.ix(), eeid.iy() );
163  nDigiszm++;
164  }
165 
166  double Emax = 0. ;
167  int Pmax = 0 ;
168  double pedestalPreSample = 0.;
169  double pedestalPreSampleAnalog = 0.;
170  int countsAfterGainSwitch = -1;
171  double higherGain = 1.;
172  int higherGainSample = 0;
173 
174  for (int sample = 0 ; sample < nrSamples; ++sample) {
175  eeAnalogSignal[sample] = 0.;
176  eeADCCounts[sample] = 0.;
177  eeADCGains[sample] = 0.;
178  }
179 
180  for (int sample = 0 ; sample < nrSamples; ++sample) {
181 
183 
184  eeADCCounts[sample] = (mySample.adc());
185  eeADCGains[sample] = (mySample.gainId()) ;
186  eeAnalogSignal[sample] = (eeADCCounts[sample]*gainConv_[(int)eeADCGains[sample]]*endcapADCtoGeV_);
187 
188  if (Emax < eeAnalogSignal[sample] ) {
189  Emax = eeAnalogSignal[sample] ;
190  Pmax = sample ;
191  }
192 
193  if ( sample < 3 ) {
194  pedestalPreSample += eeADCCounts[sample] ;
195  pedestalPreSampleAnalog += eeADCCounts[sample]*gainConv_[(int)eeADCGains[sample]]*endcapADCtoGeV_ ;
196  }
197 
198  if (sample > 0 && ( ((eeADCGains[sample] > eeADCGains[sample-1]) && (eeADCGains[sample-1]!=0)) || (countsAfterGainSwitch<0 && eeADCGains[sample]==0)) ){
199  higherGain = eeADCGains[sample];
200  higherGainSample = sample;
201  countsAfterGainSwitch = 1;
202  }
203 
204  if ( (higherGain > 1 && (higherGainSample != sample) && (eeADCGains[sample] == higherGain)) || (higherGain==3 && (higherGainSample != sample) && (eeADCGains[sample]==0)) || (higherGain==0 && (higherGainSample != sample) && ((eeADCGains[sample]==0) || (eeADCGains[sample]==3))) ) countsAfterGainSwitch++ ;
205  }
206  pedestalPreSample /= 3. ;
207  pedestalPreSampleAnalog /= 3. ;
208 
209  LogDebug("DigiInfo") << "Endcap Digi for EEDetId = " << eeid.rawId() << " x,y " << eeid.ix() << " " << eeid.iy() ;
210  for ( int i = 0; i < 10 ; i++ ) {
211  LogDebug("DigiInfo") << "sample " << i << " ADC = " << eeADCCounts[i] << " gain = " << eeADCGains[i] << " Analog = " << eeAnalogSignal[i] ;
212  }
213  LogDebug("DigiInfo") << "Maximum energy = " << Emax << " in sample " << Pmax << " Pedestal from pre-sample = " << pedestalPreSampleAnalog;
214  if ( countsAfterGainSwitch > 0 ) LogDebug("DigiInfo") << "Counts after switch " << countsAfterGainSwitch;
215 
216  if ( countsAfterGainSwitch > 0 && countsAfterGainSwitch < 5 ) {
217  edm::LogWarning("DigiWarning") << "Wrong number of counts after gain switch before next switch! " << countsAfterGainSwitch ;
218  for ( int i = 0; i < 10 ; i++ ) {
219  edm::LogWarning("DigiWarning") << "sample " << i << " ADC = " << eeADCCounts[i] << " gain = " << eeADCGains[i] << " Analog = " << eeAnalogSignal[i];
220  }
221  }
222 
223  for ( int i = 0 ; i < 10 ; i++ ) {
224  if (meEEDigiADCGlobal_ && (Emax-pedestalPreSampleAnalog*gainConv_[(int)eeADCGains[Pmax]]) > 100.*endcapADCtoGeV_) meEEDigiADCGlobal_->Fill( i , eeAnalogSignal[i] ) ;
225  if (meEEDigiADCAnalog_[i]) meEEDigiADCAnalog_[i]->Fill( eeAnalogSignal[i] ) ;
226  if ( eeADCGains[i] == 0 ) {
227  if (meEEDigiADCgS_[i]) meEEDigiADCgS_[i]->Fill( eeADCCounts[i] ) ;
228  }
229  else if ( eeADCGains[i] == 3 ) {
230  if (meEEDigiADCg1_[i]) meEEDigiADCg1_[i]->Fill( eeADCCounts[i] ) ;
231  }
232  else if ( eeADCGains[i] == 2 ) {
233  if (meEEDigiADCg6_[i]) meEEDigiADCg6_[i]->Fill( eeADCCounts[i] ) ;
234  }
235  else if ( eeADCGains[i] == 1 ) {
236  if (meEEDigiADCg12_[i]) meEEDigiADCg12_[i]->Fill( eeADCCounts[i] ) ;
237  }
238  if (meEEDigiGain_[i]) meEEDigiGain_[i]->Fill( eeADCGains[i] ) ;
239  }
240 
241  if (meEEPedestal_) meEEPedestal_->Fill ( pedestalPreSample ) ;
242  if (meEEMaximumgt20ADC_ && (Emax-pedestalPreSampleAnalog*gainConv_[(int)eeADCGains[Pmax]]) > 20.*endcapADCtoGeV_) meEEMaximumgt20ADC_->Fill( Pmax ) ;
243  if (meEEMaximumgt100ADC_ && (Emax-pedestalPreSampleAnalog*gainConv_[(int)eeADCGains[Pmax]]) > 100.*endcapADCtoGeV_) meEEMaximumgt100ADC_->Fill( Pmax ) ;
244  if (meEEnADCafterSwitch_) meEEnADCafterSwitch_->Fill(countsAfterGainSwitch);
245 
246  }
247 
250 
251 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
int ix() const
Definition: EEDetId.h:76
int gainId() const
get the gainId (2 bits)
int size() const
Definition: EcalDataFrame.h:26
void Fill(long long x)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
MonitorElement * meEEDigiADCAnalog_[10]
int zside() const
Definition: EEDetId.h:70
int iy() const
Definition: EEDetId.h:82
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
bool isValid() const
Definition: HandleBase.h:75
MonitorElement * meEEDigiADCg12_[10]
key_type id() const
Definition: EEDataFrame.h:28
T const * product() const
Definition: Handle.h:81
std::map< int, double, std::less< int > > gainConv_
static const int MAXSAMPLES
Definition: EcalDataFrame.h:48
int adc() const
get the ADC sample (12 bits)
void EcalEndcapDigisValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 60 of file EcalEndcapDigisValidation.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), timingPdfMaker::histo, i, meEEDigiADCAnalog_, meEEDigiADCg12_, meEEDigiADCg1_, meEEDigiADCg6_, meEEDigiADCGlobal_, meEEDigiADCgS_, meEEDigiGain_, meEEDigiMultiplicityzm_, meEEDigiMultiplicityzp_, meEEDigiOccupancyzm_, meEEDigiOccupancyzp_, meEEMaximumgt100ADC_, meEEMaximumgt20ADC_, meEEnADCafterSwitch_, meEEPedestal_, and DQMStore::IBooker::setCurrentFolder().

60  {
61 
62  Char_t histo[200];
63 
64  ibooker.setCurrentFolder("EcalDigisV/EcalDigiTask");
65 
66  sprintf (histo, "EcalDigiTask Endcap occupancy z+" ) ;
67  meEEDigiOccupancyzp_ = ibooker.book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
68 
69  sprintf (histo, "EcalDigiTask Endcap occupancy z-" ) ;
70  meEEDigiOccupancyzm_ = ibooker.book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
71 
72  sprintf (histo, "EcalDigiTask Endcap multiplicity z+" ) ;
73  meEEDigiMultiplicityzp_ = ibooker.book1D(histo, histo, 100, 0., 7324.);
74 
75  sprintf (histo, "EcalDigiTask Endcap multiplicity z-" ) ;
76  meEEDigiMultiplicityzm_ = ibooker.book1D(histo, histo, 100, 0., 7324.);
77 
78  sprintf (histo, "EcalDigiTask Endcap global pulse shape" ) ;
79  meEEDigiADCGlobal_ = ibooker.bookProfile(histo, histo, 10, 0, 10, 10000, 0., 1000.) ;
80 
81  for (int i = 0; i < 10 ; i++ ) {
82 
83  sprintf (histo, "EcalDigiTask Endcap analog pulse %02d", i+1) ;
84  meEEDigiADCAnalog_[i] = ibooker.book1D(histo, histo, 4000, 0., 400.);
85 
86  sprintf (histo, "EcalDigiTask Endcap ADC pulse %02d Gain 0 - Saturated", i+1) ;
87  meEEDigiADCgS_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
88 
89  sprintf (histo, "EcalDigiTask Endcap ADC pulse %02d Gain 1", i+1) ;
90  meEEDigiADCg1_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
91 
92  sprintf (histo, "EcalDigiTask Endcap ADC pulse %02d Gain 6", i+1) ;
93  meEEDigiADCg6_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
94 
95  sprintf (histo, "EcalDigiTask Endcap ADC pulse %02d Gain 12", i+1) ;
96  meEEDigiADCg12_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5);
97 
98  sprintf (histo, "EcalDigiTask Endcap gain pulse %02d", i+1) ;
99  meEEDigiGain_[i] = ibooker.book1D(histo, histo, 4, 0, 4);
100  }
101 
102  sprintf (histo, "EcalDigiTask Endcap pedestal for pre-sample" ) ;
103  meEEPedestal_ = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5) ;
104 
105  sprintf (histo, "EcalDigiTask Endcap maximum position gt 100 ADC" ) ;
106  meEEMaximumgt100ADC_ = ibooker.book1D(histo, histo, 10, 0., 10.) ;
107 
108  sprintf (histo, "EcalDigiTask Endcap maximum position gt 20 ADC" ) ;
109  meEEMaximumgt20ADC_ = ibooker.book1D(histo, histo, 10, 0., 10.) ;
110 
111  sprintf (histo, "EcalDigiTask Endcap ADC counts after gain switch" ) ;
112  meEEnADCafterSwitch_ = ibooker.book1D(histo, histo, 10, 0., 10.) ;
113 
114 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEEDigiADCAnalog_[10]
MonitorElement * meEEDigiADCg12_[10]
void EcalEndcapDigisValidation::checkCalibrations ( edm::EventSetup const &  c)
protected

Definition at line 253 of file EcalEndcapDigisValidation.cc.

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

Referenced by dqmBeginRun().

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

Reimplemented from DQMEDAnalyzer.

Definition at line 116 of file EcalEndcapDigisValidation.cc.

References checkCalibrations().

116  {
117 
119 
120 }
void checkCalibrations(edm::EventSetup const &c)

Member Data Documentation

double EcalEndcapDigisValidation::barrelADCtoGeV_
private

Definition at line 67 of file EcalEndcapDigisValidation.h.

Referenced by checkCalibrations(), and EcalEndcapDigisValidation().

edm::EDGetTokenT<EEDigiCollection> EcalEndcapDigisValidation::EEdigiCollectionToken_
private

Definition at line 63 of file EcalEndcapDigisValidation.h.

Referenced by analyze().

double EcalEndcapDigisValidation::endcapADCtoGeV_
private
std::map<int, double, std::less<int> > EcalEndcapDigisValidation::gainConv_
private
MonitorElement* EcalEndcapDigisValidation::meEEDigiADCAnalog_[10]
private

Definition at line 78 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiADCg12_[10]
private

Definition at line 83 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiADCg1_[10]
private

Definition at line 81 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiADCg6_[10]
private

Definition at line 82 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiADCGlobal_
private

Definition at line 76 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiADCgS_[10]
private

Definition at line 80 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiGain_[10]
private

Definition at line 85 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiMultiplicityzm_
private

Definition at line 74 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiMultiplicityzp_
private

Definition at line 73 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiOccupancyzm_
private

Definition at line 71 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEDigiOccupancyzp_
private

Definition at line 70 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEMaximumgt100ADC_
private

Definition at line 89 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEMaximumgt20ADC_
private

Definition at line 91 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEnADCafterSwitch_
private

Definition at line 93 of file EcalEndcapDigisValidation.h.

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

MonitorElement* EcalEndcapDigisValidation::meEEPedestal_
private

Definition at line 87 of file EcalEndcapDigisValidation.h.

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

std::string EcalEndcapDigisValidation::outputFile_
private

Definition at line 61 of file EcalEndcapDigisValidation.h.

bool EcalEndcapDigisValidation::verbose_
private

Definition at line 59 of file EcalEndcapDigisValidation.h.

Referenced by EcalEndcapDigisValidation().