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
EcalPreshowerNoiseDistrib Class Reference

#include <EcalPreshowerNoiseDistrib.h>

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

Public Member Functions

void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 EcalPreshowerNoiseDistrib (const edm::ParameterSet &ps)
 Constructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 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 ()
 
 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 & 
itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
- 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

edm::EDGetTokenT
< ESDigiCollection
ESdigiCollectionToken_
 
MonitorElementmeESDigi3D_
 
MonitorElementmeESDigiADC_ [3]
 
MonitorElementmeESDigiCorr_ [3]
 
MonitorElementmeESDigiMultiplicity_
 
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 28 of file EcalPreshowerNoiseDistrib.h.

Member Typedef Documentation

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

Definition at line 30 of file EcalPreshowerNoiseDistrib.h.

Constructor & Destructor Documentation

EcalPreshowerNoiseDistrib::EcalPreshowerNoiseDistrib ( const edm::ParameterSet ps)

Constructor.

Definition at line 8 of file EcalPreshowerNoiseDistrib.cc.

References edm::ParameterSet::getUntrackedParameter(), cuy::ii, meESDigiADC_, meESDigiMultiplicity_, and verbose_.

8  :
9  ESdigiCollectionToken_( consumes<ESDigiCollection>( ps.getParameter<edm::InputTag>( "ESdigiCollection" ) ) )
10 {
11 
12  // verbosity switch
13  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
14 
15  // histos
17  for (int ii=0; ii<3; ii++ ) { meESDigiADC_[ii] = 0; }
18 
19 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int ii
Definition: cuy.py:588
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_

Member Function Documentation

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

Analyze.

Implements edm::stream::EDAnalyzerBase.

Definition at line 41 of file EcalPreshowerNoiseDistrib.cc.

References ecalMGPA::adc(), ESSample::adc(), ESdigiCollectionToken_, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::Event::getByToken(), edm::HandleBase::isValid(), ESDataFrame::MAXSAMPLES, meESDigi3D_, meESDigiADC_, meESDigiCorr_, meESDigiMultiplicity_, ecalTB2006H4_GenSimDigiReco_cfg::mySample, edm::Handle< T >::product(), compare_using_db::sample, and ESDataFrame::size().

41  {
42 
44 
45  e.getByToken( ESdigiCollectionToken_ , EcalDigiES );
46 
47  // retrun if no data
48  if( !EcalDigiES.isValid() ) return;
49 
50  // loop over Digis
51  const ESDigiCollection * preshowerDigi = EcalDigiES.product () ;
52 
53  std::vector<double> esADCCounts ;
54  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
55 
56  int nDigis = 0;
57 
58  for (unsigned int digis=0; digis<EcalDigiES->size(); ++digis) {
59  nDigis++;
60  ESDataFrame esdf=(*preshowerDigi)[digis];
61  int nrSamples=esdf.size();
62  for (int sample = 0 ; sample < nrSamples; ++sample) {
63  ESSample mySample = esdf[sample];
64  if (meESDigiADC_[sample]) { meESDigiADC_[sample] ->Fill(mySample.adc()); }
65  }
66 
67  // to study correlations
68  if(meESDigiCorr_[0]){ meESDigiCorr_[0]->Fill(esdf[0].adc(),esdf[1].adc()); }
69  if(meESDigiCorr_[1]){ meESDigiCorr_[1]->Fill(esdf[0].adc(),esdf[2].adc()); }
70  if(meESDigiCorr_[2]){ meESDigiCorr_[2]->Fill(esdf[1].adc(),esdf[2].adc()); }
71 
72  // reference histo: sample0, sample1, sample2
73  if ( meESDigi3D_ ) meESDigi3D_ -> Fill(esdf[0].adc(),esdf[1].adc(),esdf[2].adc());
74  }
75 
77 
78 }
int adc(sample_type sample)
get the ADC sample (12 bits)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
int size() const
Definition: ESDataFrame.h:23
void Fill(long long x)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static const int MAXSAMPLES
Definition: ESDataFrame.h:32
bool isValid() const
Definition: HandleBase.h:75
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
int adc() const
get the ADC sample (singed 16 bits)
Definition: ESSample.h:18
void EcalPreshowerNoiseDistrib::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 21 of file EcalPreshowerNoiseDistrib.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::book3D(), timingPdfMaker::histo, cuy::ii, meESDigi3D_, meESDigiADC_, meESDigiCorr_, and meESDigiMultiplicity_.

21  {
22  Char_t histo[200];
23 
24  sprintf (histo, "multiplicity" ) ;
25  meESDigiMultiplicity_ = ibooker.book1D(histo, histo, 1000, 0., 137728);
26 
27  for ( int ii = 0; ii < 3 ; ii++ ) {
28  sprintf (histo, "esRefHistos%02d", ii) ;
29  meESDigiADC_[ii] = ibooker.book1D(histo, histo, 35, 983.5, 1018.5) ;
30  }
31 
32  for ( int ii = 0; ii < 3 ; ii++ ) {
33  sprintf (histo, "esRefHistosCorr%02d", ii) ;
34  meESDigiCorr_[ii] = ibooker.book2D(histo, histo, 35, 983.5, 1018.5, 35, 983.5, 1018.5) ;
35  }
36 
37  meESDigi3D_ = ibooker.book3D("meESDigi3D_", "meESDigi3D_", 35, 983.5, 1018.5, 35, 983.5, 1018.5, 35, 983.5, 1018.5) ;
38 }
int ii
Definition: cuy.py:588

Member Data Documentation

edm::EDGetTokenT<ESDigiCollection> EcalPreshowerNoiseDistrib::ESdigiCollectionToken_
private

Definition at line 50 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze().

MonitorElement* EcalPreshowerNoiseDistrib::meESDigi3D_
private

Definition at line 54 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiADC_[3]
private

Definition at line 52 of file EcalPreshowerNoiseDistrib.h.

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

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiCorr_[3]
private

Definition at line 53 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiMultiplicity_
private

Definition at line 55 of file EcalPreshowerNoiseDistrib.h.

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

std::string EcalPreshowerNoiseDistrib::outputFile_
private

Definition at line 48 of file EcalPreshowerNoiseDistrib.h.

bool EcalPreshowerNoiseDistrib::verbose_
private

Definition at line 46 of file EcalPreshowerNoiseDistrib.h.

Referenced by EcalPreshowerNoiseDistrib().