CMS 3D CMS Logo

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

#include <DigiCollectionProfiler.h>

Public Member Functions

void analyze (edm::Handle< edm::DetSetVector< SiStripDigi > > digis)
 
 DigiCollectionProfiler ()
 
 DigiCollectionProfiler (TProfile *tibprof, TProfile *tobprof, TProfile *tecpprof, TProfile *tecmprof, TH2F *tib2d, TH2F *tob2d, TH2F *tecp2d, TH2F *tecm2d)
 
void setMaskedModules (std::vector< unsigned int > maskedmod)
 
 ~DigiCollectionProfiler ()
 

Private Member Functions

int ismasked (const DetId &mod) const
 

Private Attributes

std::vector< unsigned int > m_maskedmod
 
unsigned int m_nevent
 
TH2F * m_tecm2d
 
TProfile * m_tecmprof
 
TH2F * m_tecp2d
 
TProfile * m_tecpprof
 
TH2F * m_tib2d
 
TProfile * m_tibprof
 
TH2F * m_tob2d
 
TProfile * m_tobprof
 

Detailed Description

Definition at line 12 of file DigiCollectionProfiler.h.

Constructor & Destructor Documentation

DigiCollectionProfiler::DigiCollectionProfiler ( )
DigiCollectionProfiler::DigiCollectionProfiler ( TProfile *  tibprof,
TProfile *  tobprof,
TProfile *  tecpprof,
TProfile *  tecmprof,
TH2F *  tib2d,
TH2F *  tob2d,
TH2F *  tecp2d,
TH2F *  tecm2d 
)
DigiCollectionProfiler::~DigiCollectionProfiler ( )
inline

Definition at line 25 of file DigiCollectionProfiler.h.

25 {};

Member Function Documentation

void DigiCollectionProfiler::analyze ( edm::Handle< edm::DetSetVector< SiStripDigi > >  digis)

Definition at line 31 of file DigiCollectionProfiler.cc.

References cond::rpcobgas::detid, ismasked(), m_nevent, m_tecm2d, m_tecmprof, m_tecp2d, m_tecpprof, m_tib2d, m_tibprof, m_tob2d, m_tobprof, text2workspace::mod, TECDetId::side(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, and SiStripDetId::TOB.

Referenced by BigEventsDebugger::analyze().

31  {
32 
33  m_nevent++;
34 
36 
37  const SiStripDetId detid(mod->detId());
38 
39  if(!ismasked(detid)) {
40  TProfile* tobefilledprof=0;
41  TH2F* tobefilled2d=0;
42  if(detid.subDetector()==SiStripDetId::TIB || detid.subDetector()==SiStripDetId::TID) {
43  tobefilledprof=m_tibprof;
44  tobefilled2d=m_tib2d;
45  }
46  else if(detid.subDetector()==SiStripDetId::TOB) {
47  tobefilledprof=m_tobprof;
48  tobefilled2d=m_tob2d;
49  }
50  else if(detid.subDetector()==SiStripDetId::TEC) {
51  const TECDetId tecid(detid);
52  if(tecid.side()==1) {
53  tobefilledprof=m_tecpprof;
54  tobefilled2d=m_tecp2d;
55  }
56  else if(tecid.side()==2) {
57  tobefilledprof=m_tecmprof;
58  tobefilled2d=m_tecm2d;
59  }
60  }
61 
62  for(edm::DetSet<SiStripDigi>::const_iterator digi=mod->begin();digi!=mod->end();digi++) {
63 
64  if(digi->adc()>0) {
65  if(tobefilledprof) tobefilledprof->Fill(digi->strip()%256,digi->adc());
66  if(tobefilled2d) tobefilled2d->Fill(digi->strip()%256,digi->adc());
67  }
68  }
69  }
70  }
71 }
list mod
Load physics model.
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:356
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:341
collection_type::const_iterator const_iterator
Definition: DetSet.h:34
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106
int ismasked(const DetId &mod) const
int DigiCollectionProfiler::ismasked ( const DetId mod) const
private

Definition at line 81 of file DigiCollectionProfiler.cc.

References m_maskedmod, and DetId::rawId().

Referenced by analyze().

81  {
82 
83  int masked=0;
84  for(std::vector<unsigned int>::const_iterator it=m_maskedmod.begin();it!=m_maskedmod.end()&&masked==0&&mod>=(*it);it++) {
85  if(mod.rawId() == (*it)) masked = 1;
86  }
87  return masked;
88 
89 }
std::vector< unsigned int > m_maskedmod
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void DigiCollectionProfiler::setMaskedModules ( std::vector< unsigned int >  maskedmod)

Definition at line 73 of file DigiCollectionProfiler.cc.

References m_maskedmod, and python.multivaluedict::sort().

Referenced by BigEventsDebugger::analyze().

73  {
74 
75  m_maskedmod = maskedmod;
76  sort(m_maskedmod.begin(),m_maskedmod.end());
77 
78 }
std::vector< unsigned int > m_maskedmod

Member Data Documentation

std::vector<unsigned int> DigiCollectionProfiler::m_maskedmod
private

Definition at line 45 of file DigiCollectionProfiler.h.

Referenced by ismasked(), and setMaskedModules().

unsigned int DigiCollectionProfiler::m_nevent
private

Definition at line 34 of file DigiCollectionProfiler.h.

Referenced by analyze().

TH2F* DigiCollectionProfiler::m_tecm2d
private

Definition at line 43 of file DigiCollectionProfiler.h.

Referenced by analyze().

TProfile* DigiCollectionProfiler::m_tecmprof
private

Definition at line 39 of file DigiCollectionProfiler.h.

Referenced by analyze().

TH2F* DigiCollectionProfiler::m_tecp2d
private

Definition at line 42 of file DigiCollectionProfiler.h.

Referenced by analyze().

TProfile* DigiCollectionProfiler::m_tecpprof
private

Definition at line 38 of file DigiCollectionProfiler.h.

Referenced by analyze().

TH2F* DigiCollectionProfiler::m_tib2d
private

Definition at line 40 of file DigiCollectionProfiler.h.

Referenced by analyze().

TProfile* DigiCollectionProfiler::m_tibprof
private

Definition at line 36 of file DigiCollectionProfiler.h.

Referenced by analyze().

TH2F* DigiCollectionProfiler::m_tob2d
private

Definition at line 41 of file DigiCollectionProfiler.h.

Referenced by analyze().

TProfile* DigiCollectionProfiler::m_tobprof
private

Definition at line 37 of file DigiCollectionProfiler.h.

Referenced by analyze().