CMS 3D CMS Logo

PFRecHitProducerHCAL Class Reference

Producer for particle flow rechits (PFRecHit) in HCAL. More...

#include <RecoParticleFlow/PFClusterProducer/interface/PFRecHitProducerHCAL.h>

Inheritance diagram for PFRecHitProducerHCAL:

PFRecHitProducer edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 PFRecHitProducerHCAL (const edm::ParameterSet &)
 ~PFRecHitProducerHCAL ()

Private Member Functions

reco::PFRecHitcreateHcalRecHit (const DetId &detid, double energy, PFLayer::Layer layer, const CaloSubdetectorGeometry *geom, unsigned newDetId=0)
void createRecHits (std::vector< reco::PFRecHit > &rechits, edm::Event &, const edm::EventSetup &)
 gets hcal barrel and endcap rechits, translate them to PFRecHits, which are stored in the rechits vector
void findRecHitNeighbours (reco::PFRecHit &rh, const std::map< unsigned, unsigned > &sortedHits, const CaloSubdetectorTopology &barrelTopo, const CaloSubdetectorGeometry &barrelGeom, const CaloSubdetectorTopology &endcapTopo, const CaloSubdetectorGeometry &endcapGeom)
 find and set the neighbours to a given rechit this works for ecal, hcal, ps
void findRecHitNeighboursCT (reco::PFRecHit &rh, const std::map< unsigned, unsigned > &sortedHits, const CaloSubdetectorTopology &topology)
 find and set the neighbours to a given rechit this works for hcal CaloTowers.
DetId getNorth (const DetId &id, const CaloSubdetectorTopology &topology)
DetId getSouth (const DetId &id, const CaloSubdetectorTopology &topology)

Private Attributes

edm::InputTag inputTagCaloTowers_
edm::InputTag inputTagHcalRecHitsHBHE_
double thresh_HF_
 threshold for HF


Detailed Description

Producer for particle flow rechits (PFRecHit) in HCAL.

Author:
Colin Bernet
Date:
february 2008

Definition at line 33 of file PFRecHitProducerHCAL.h.


Constructor & Destructor Documentation

PFRecHitProducerHCAL::PFRecHitProducerHCAL ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 36 of file PFRecHitProducerHCAL.cc.

References edm::ParameterSet::getParameter(), inputTagCaloTowers_, inputTagHcalRecHitsHBHE_, and thresh_HF_.

00037   : PFRecHitProducer( iConfig ) 
00038 {
00039 
00040  
00041 
00042   // access to the collections of rechits 
00043 
00044   
00045   inputTagHcalRecHitsHBHE_ =
00046     iConfig.getParameter<InputTag>("hcalRecHitsHBHE");
00047     
00048  
00049   inputTagCaloTowers_ = 
00050     iConfig.getParameter<InputTag>("caloTowers");
00051    
00052   thresh_HF_ = 
00053     iConfig.getParameter<double>("thresh_HF");
00054 }

PFRecHitProducerHCAL::~PFRecHitProducerHCAL (  ) 

Definition at line 58 of file PFRecHitProducerHCAL.cc.

00058 {}


Member Function Documentation

reco::PFRecHit * PFRecHitProducerHCAL::createHcalRecHit ( const DetId detid,
double  energy,
PFLayer::Layer  layer,
const CaloSubdetectorGeometry geom,
unsigned  newDetId = 0 
) [private]

Definition at line 302 of file PFRecHitProducerHCAL.cc.

References lat::endl(), CaloCellGeometry::getCorners(), CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), DetId::rawId(), reco::PFRecHit::setNECorner(), reco::PFRecHit::setNWCorner(), reco::PFRecHit::setSECorner(), reco::PFRecHit::setSWCorner(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.

00306                                                             {
00307   
00308   const CaloCellGeometry *thisCell = geom->getGeometry(detid);
00309   if(!thisCell) {
00310     edm::LogError("PFRecHitProducerHCAL")
00311       <<"warning detid "<<detid.rawId()<<" not found in layer "
00312       <<layer<<endl;
00313     return 0;
00314   }
00315   
00316   const GlobalPoint& position = thisCell->getPosition();
00317   
00318   
00319   unsigned id = detid;
00320   if(newDetId) id = newDetId;
00321   reco::PFRecHit *rh = 
00322     new reco::PFRecHit( id,  layer, energy, 
00323                         position.x(), position.y(), position.z(), 
00324                         0,0,0 );
00325  
00326   
00327   
00328   
00329   // set the corners
00330   const CaloCellGeometry::CornersVec& corners = thisCell->getCorners();
00331 
00332   assert( corners.size() == 8 );
00333 
00334   rh->setNECorner( corners[0].x(), corners[0].y(),  corners[0].z() );
00335   rh->setSECorner( corners[1].x(), corners[1].y(),  corners[1].z() );
00336   rh->setSWCorner( corners[2].x(), corners[2].y(),  corners[2].z() );
00337   rh->setNWCorner( corners[3].x(), corners[3].y(),  corners[3].z() );
00338  
00339   return rh;
00340 }

void PFRecHitProducerHCAL::createRecHits ( std::vector< reco::PFRecHit > &  rechits,
edm::Event ,
const edm::EventSetup  
) [private, virtual]

gets hcal barrel and endcap rechits, translate them to PFRecHits, which are stored in the rechits vector

Implements PFRecHitProducer.

void PFRecHitProducerHCAL::findRecHitNeighbours ( reco::PFRecHit rh,
const std::map< unsigned, unsigned > &  sortedHits,
const CaloSubdetectorTopology barrelTopo,
const CaloSubdetectorGeometry barrelGeom,
const CaloSubdetectorTopology endcapTopo,
const CaloSubdetectorGeometry endcapGeom 
) [private]

find and set the neighbours to a given rechit this works for ecal, hcal, ps

void PFRecHitProducerHCAL::findRecHitNeighboursCT ( reco::PFRecHit rh,
const std::map< unsigned, unsigned > &  sortedHits,
const CaloSubdetectorTopology topology 
) [private]

find and set the neighbours to a given rechit this works for hcal CaloTowers.

Should be possible to have a single function for all detectors

DetId PFRecHitProducerHCAL::getNorth ( const DetId id,
const CaloSubdetectorTopology topology 
) [private]

Definition at line 621 of file PFRecHitProducerHCAL.cc.

References CaloSubdetectorTopology::north().

00622                                                                            {
00623 
00624   DetId north;
00625   vector<DetId> nids = topology.north(id);
00626   if(nids.size() == 1)
00627     north = nids[0];
00628   
00629   return north;
00630 } 

DetId PFRecHitProducerHCAL::getSouth ( const DetId id,
const CaloSubdetectorTopology topology 
) [private]

Definition at line 608 of file PFRecHitProducerHCAL.cc.

References CaloSubdetectorTopology::south().

00609                                                                            {
00610 
00611   DetId south;
00612   vector<DetId> sids = topology.south(id);
00613   if(sids.size() == 1)
00614     south = sids[0];
00615   
00616   return south;
00617 } 


Member Data Documentation

edm::InputTag PFRecHitProducerHCAL::inputTagCaloTowers_ [private]

Definition at line 85 of file PFRecHitProducerHCAL.h.

Referenced by PFRecHitProducerHCAL().

edm::InputTag PFRecHitProducerHCAL::inputTagHcalRecHitsHBHE_ [private]

Definition at line 84 of file PFRecHitProducerHCAL.h.

Referenced by PFRecHitProducerHCAL().

double PFRecHitProducerHCAL::thresh_HF_ [private]

threshold for HF

Definition at line 88 of file PFRecHitProducerHCAL.h.

Referenced by PFRecHitProducerHCAL().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:45 2009 for CMSSW by  doxygen 1.5.4