CMS 3D CMS Logo

Public Member Functions | Private Attributes

CaloMiscalibMapHcal Class Reference

#include <CaloMiscalibMapHcal.h>

Inheritance diagram for CaloMiscalibMapHcal:
CaloMiscalibMap

List of all members.

Public Member Functions

virtual void addCell (const DetId &cell, float scaling_factor)
 CaloMiscalibMapHcal ()
const std::map< uint32_t, float > & get ()
void prefillMap ()
void print ()

Private Attributes

std::map< uint32_t, float > mapHcal_
HcalTopology topology

Detailed Description

Definition at line 19 of file CaloMiscalibMapHcal.h.


Constructor & Destructor Documentation

CaloMiscalibMapHcal::CaloMiscalibMapHcal ( ) [inline]

Definition at line 21 of file CaloMiscalibMapHcal.h.

                     { 
}

Member Function Documentation

virtual void CaloMiscalibMapHcal::addCell ( const DetId cell,
float  scaling_factor 
) [inline, virtual]

Implements CaloMiscalibMap.

Definition at line 50 of file CaloMiscalibMapHcal.h.

References mapHcal_, and DetId::rawId().

{
  //mapHcal_.setValue(cell.rawId(),scaling_factor);
  mapHcal_[cell.rawId()]=scaling_factor;
}
const std::map<uint32_t, float>& CaloMiscalibMapHcal::get ( void  ) [inline]

Definition at line 68 of file CaloMiscalibMapHcal.h.

References mapHcal_.

Referenced by HcalRecHitsMaker::init(), and HcalRecHitRecalib::produce().

                                     {
return mapHcal_;
}
void CaloMiscalibMapHcal::prefillMap ( ) [inline]

Definition at line 24 of file CaloMiscalibMapHcal.h.

References eta(), mapHcal_, phi, DetId::rawId(), topology, and HcalTopology::valid().

Referenced by HcalRecHitRecalib::HcalRecHitRecalib(), and HcalRecHitsMaker::init().

                 {

  for (int det = 1; det < 5; det++) {
    for (int eta = -63; eta < 64; eta++) {
      for (int phi = 0; phi < 128; phi++) {
        for (int depth = 1; depth < 5; depth++) {

          try {
            HcalDetId hcaldetid ((HcalSubdetector) det, eta, phi, depth);
            if (topology.valid(hcaldetid))
            //      mapHcal_.setValue(hcaldetid.rawId(),1.0);
            {
              mapHcal_[hcaldetid.rawId()]=1.0; 
              //              std::cout << "Valid cell found: " << det << " " << eta << " " << phi << " " << depth << std::endl;
            }
                
          }
          catch (...) {
          }
        }
      }
    }
  }
}
void CaloMiscalibMapHcal::print ( void  ) [inline]

Definition at line 56 of file CaloMiscalibMapHcal.h.

References mapHcal_.

Referenced by HcalRecHitRecalib::HcalRecHitRecalib().

 {
 
 std::map<uint32_t,float>::const_iterator it;
 
 //   for(it=mapHcal_.getMap().begin();it!=mapHcal_.getMap().end();it++){
 //   }
   for(it=mapHcal_.begin();it!=mapHcal_.end();it++){
   }
 
}

Member Data Documentation

std::map<uint32_t, float> CaloMiscalibMapHcal::mapHcal_ [private]

Definition at line 74 of file CaloMiscalibMapHcal.h.

Referenced by addCell(), get(), prefillMap(), and print().

Definition at line 75 of file CaloMiscalibMapHcal.h.

Referenced by prefillMap().