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 (const HcalTopology &topology)
void print ()

Private Attributes

std::map< uint32_t, float > mapHcal_

Detailed Description

Definition at line 16 of file CaloMiscalibMapHcal.h.


Constructor & Destructor Documentation

CaloMiscalibMapHcal::CaloMiscalibMapHcal ( ) [inline]

Definition at line 18 of file CaloMiscalibMapHcal.h.

                         {
    }

Member Function Documentation

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

Implements CaloMiscalibMap.

Definition at line 47 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 65 of file CaloMiscalibMapHcal.h.

References mapHcal_.

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

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

Definition at line 21 of file CaloMiscalibMapHcal.h.

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

Referenced by HcalRecHitRecalib::beginRun(), 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 53 of file CaloMiscalibMapHcal.h.

References mapHcal_.

Referenced by HcalRecHitRecalib::beginRun().

 {
 
 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 71 of file CaloMiscalibMapHcal.h.

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