CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCTowerAlgo< FECODEC, DATA > Class Template Reference
Inheritance diagram for HGCTowerAlgo< FECODEC, DATA >:
HGCalTriggerBackend::Algorithm< FECODEC > HGCalTriggerBackendAlgorithmBase

Public Member Functions

 HGCTowerAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
void putInEvent (edm::Event &evt) final
 
void reset () final
 
void run (const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) final
 
void setProduces (edm::stream::EDProducer<> &prod) const final
 
- Public Member Functions inherited from HGCalTriggerBackend::Algorithm< FECODEC >
 Algorithm (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
void setGeometry (const HGCalTriggerGeometryBase *const geom) final
 
- Public Member Functions inherited from HGCalTriggerBackendAlgorithmBase
 HGCalTriggerBackendAlgorithmBase (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
const std::string & name () const
 
virtual ~HGCalTriggerBackendAlgorithmBase ()
 

Private Attributes

HGCalTriggerCellCalibration calibration_
 
std::unique_ptr< l1t::HGCalTowerBxCollectiontower_product_
 
HGCalTowerMap2DImpl towermap2D_
 
HGCalTowerMap3DImpl towermap3D_
 
std::unique_ptr< l1t::HGCalTowerMapBxCollectiontowermap_product_
 
std::unique_ptr< l1t::HGCalTriggerCellBxCollectiontrgcell_product_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalTriggerBackend::Algorithm< FECODEC >
FECODEC codec_
 
- Protected Attributes inherited from HGCalTriggerBackendAlgorithmBase
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

template<typename FECODEC, typename DATA>
class HGCTowerAlgo< FECODEC, DATA >

Definition at line 20 of file HGCTowerAlgo.cc.

Constructor & Destructor Documentation

template<typename FECODEC , typename DATA >
HGCTowerAlgo< FECODEC, DATA >::HGCTowerAlgo ( const edm::ParameterSet conf,
edm::ConsumesCollector cc 
)
inline

Definition at line 31 of file HGCTowerAlgo.cc.

31  :
32  Algorithm<FECODEC>(conf, cc),
36  calibration_( conf.getParameterSet("calib_parameters") ),
37  towermap2D_( conf.getParameterSet("towermap_parameters") ),
38  towermap3D_( )
39  {
40  }
std::unique_ptr< l1t::HGCalTowerMapBxCollection > towermap_product_
Definition: HGCTowerAlgo.cc:72
std::unique_ptr< l1t::HGCalTriggerCellBxCollection > trgcell_product_
Definition: HGCTowerAlgo.cc:71
HGCalTriggerCellCalibration calibration_
Definition: HGCTowerAlgo.cc:78
HGCalTowerMap2DImpl towermap2D_
Definition: HGCTowerAlgo.cc:79
std::unique_ptr< l1t::HGCalTowerBxCollection > tower_product_
Definition: HGCTowerAlgo.cc:73
HGCalTowerMap3DImpl towermap3D_
Definition: HGCTowerAlgo.cc:80

Member Function Documentation

template<typename FECODEC , typename DATA >
void HGCTowerAlgo< FECODEC, DATA >::putInEvent ( edm::Event evt)
inlinefinalvirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 54 of file HGCTowerAlgo.cc.

55  {
56 
57  }
template<typename FECODEC , typename DATA >
void HGCTowerAlgo< FECODEC, DATA >::reset ( void  )
inlinefinalvirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 60 of file HGCTowerAlgo.cc.

61  {
65  }
std::unique_ptr< l1t::HGCalTowerMapBxCollection > towermap_product_
Definition: HGCTowerAlgo.cc:72
std::unique_ptr< l1t::HGCalTriggerCellBxCollection > trgcell_product_
Definition: HGCTowerAlgo.cc:71
std::unique_ptr< l1t::HGCalTowerBxCollection > tower_product_
Definition: HGCTowerAlgo.cc:73
template<typename FECODEC , typename DATA >
void HGCTowerAlgo< FECODEC, DATA >::run ( const l1t::HGCFETriggerDigiCollection coll,
const edm::EventSetup es,
edm::Event evt 
)
finalvirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 85 of file HGCTowerAlgo.cc.

References cscdqm::DATA, data, edm::EventSetup::get(), mps_fire::i, eostools::move(), edm::Event::put(), and BXVector< T >::size().

88 {
89  es.get<CaloGeometryRecord>().get("", triggerGeometry_);
92 
93  for( const auto& digi : coll ){
94 
95  HGCalDetId module_id( digi.id() );
96 
97 
98  DATA data;
99  data.reset();
100  digi.decode(codec_, data);
101 
102  for(const auto& triggercell : data.payload)
103  {
104 
105  if( triggercell.hwPt() > 0 )
106  {
107  l1t::HGCalTriggerCell calibratedtriggercell( triggercell );
108  calibration_.calibrateInGeV( calibratedtriggercell);
109  trgcell_product_->push_back( 0, calibratedtriggercell );
110  }
111 
112  }
113 
114  }
115 
116  /* orphan handles to the collections of trigger-cells, towermaps and towers */
120 
121  /* retrieve the orphan handle to the trigger-cells collection and put the collection in the event */
122  triggerCellsHandle = evt.put( std::move( trgcell_product_ ), "calibratedTriggerCellsTower");
123 
124  /* create a persistent vector of pointers to the trigger-cells */
125  std::vector<edm::Ptr<l1t::HGCalTriggerCell>> triggerCellsPtrs;
126  for( unsigned i = 0; i < triggerCellsHandle->size(); ++i ) {
127  edm::Ptr<l1t::HGCalTriggerCell> ptr(triggerCellsHandle,i);
128  triggerCellsPtrs.push_back(ptr);
129  }
130 
131  /* call to towerMap2D clustering */
132  towermap2D_.buildTowerMap2D( triggerCellsPtrs, *towermap_product_);
133 
134  /* retrieve the orphan handle to the towermaps collection and put the collection in the event */
135  towerMapsHandle = evt.put( std::move( towermap_product_ ), "towerMap");
136 
137  /* create a persistent vector of pointers to the towerMaps */
138  std::vector<edm::Ptr<l1t::HGCalTowerMap>> towerMapsPtrs;
139  for( unsigned i = 0; i < towerMapsHandle->size(); ++i ) {
140  edm::Ptr<l1t::HGCalTowerMap> ptr(towerMapsHandle,i);
141  towerMapsPtrs.push_back(ptr);
142  }
143 
144  /* call to towerMap3D clustering */
145  towermap3D_.buildTowerMap3D( towerMapsPtrs, *tower_product_);
146 
147  /* retrieve the orphan handle to the tower collection and put the collection in the event */
148  towersHandle = evt.put( std::move( tower_product_ ), "tower");
149 
150 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
std::unique_ptr< l1t::HGCalTowerMapBxCollection > towermap_product_
Definition: HGCTowerAlgo.cc:72
unsigned size(int bx) const
std::unique_ptr< l1t::HGCalTriggerCellBxCollection > trgcell_product_
Definition: HGCTowerAlgo.cc:71
void eventSetup(const edm::EventSetup &es)
void eventSetup(const edm::EventSetup &es)
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCTowerAlgo.cc:75
HGCalTriggerCellCalibration calibration_
Definition: HGCTowerAlgo.cc:78
void buildTowerMap2D(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalTowerMapBxCollection &towermaps)
void buildTowerMap3D(const std::vector< edm::Ptr< l1t::HGCalTowerMap >> &towerMaps2D, l1t::HGCalTowerBxCollection &towerMap)
HGCalTowerMap2DImpl towermap2D_
Definition: HGCTowerAlgo.cc:79
std::unique_ptr< l1t::HGCalTowerBxCollection > tower_product_
Definition: HGCTowerAlgo.cc:73
const T & get() const
Definition: EventSetup.h:59
HGCalTowerMap3DImpl towermap3D_
Definition: HGCTowerAlgo.cc:80
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void calibrateInGeV(l1t::HGCalTriggerCell &)
def move(src, dest)
Definition: eostools.py:510
template<typename FECODEC , typename DATA >
void HGCTowerAlgo< FECODEC, DATA >::setProduces ( edm::stream::EDProducer<> &  prod) const
inlinefinalvirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 43 of file HGCTowerAlgo.cc.

References coll, parseEventContent::prod, and findQualityFiles::run.

44  {
45  prod.produces<l1t::HGCalTriggerCellBxCollection>( "calibratedTriggerCellsTower" );
46  prod.produces<l1t::HGCalTowerMapBxCollection>( "towerMap" );
47  prod.produces<l1t::HGCalTowerBxCollection>( "tower" );
48  }

Member Data Documentation

template<typename FECODEC , typename DATA >
HGCalTriggerCellCalibration HGCTowerAlgo< FECODEC, DATA >::calibration_
private

Definition at line 78 of file HGCTowerAlgo.cc.

template<typename FECODEC , typename DATA >
std::unique_ptr<l1t::HGCalTowerBxCollection> HGCTowerAlgo< FECODEC, DATA >::tower_product_
private

Definition at line 73 of file HGCTowerAlgo.cc.

template<typename FECODEC , typename DATA >
HGCalTowerMap2DImpl HGCTowerAlgo< FECODEC, DATA >::towermap2D_
private

Definition at line 79 of file HGCTowerAlgo.cc.

template<typename FECODEC , typename DATA >
HGCalTowerMap3DImpl HGCTowerAlgo< FECODEC, DATA >::towermap3D_
private

Definition at line 80 of file HGCTowerAlgo.cc.

template<typename FECODEC , typename DATA >
std::unique_ptr<l1t::HGCalTowerMapBxCollection> HGCTowerAlgo< FECODEC, DATA >::towermap_product_
private

Definition at line 72 of file HGCTowerAlgo.cc.

template<typename FECODEC , typename DATA >
std::unique_ptr<l1t::HGCalTriggerCellBxCollection> HGCTowerAlgo< FECODEC, DATA >::trgcell_product_
private

Definition at line 71 of file HGCTowerAlgo.cc.

template<typename FECODEC , typename DATA >
edm::ESHandle<HGCalTriggerGeometryBase> HGCTowerAlgo< FECODEC, DATA >::triggerGeometry_
private

Definition at line 75 of file HGCTowerAlgo.cc.