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
L1GctInternJetProducer Class Reference

#include <L1GctInternJetProducer.h>

Inheritance diagram for L1GctInternJetProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1GctInternJetProducer (const edm::ParameterSet &)
 
 ~L1GctInternJetProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
math::PtEtaPhiMLorentzVector gctLorentzVector (const double &et, const L1GctCand &cand, const L1CaloGeometry *geom, bool central)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

bool centralBxOnly_
 
edm::InputTag internalJetSource_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

EventFilter/GctRawToDigi/plugins/L1GctInternJetProducer.cc

EventFilter/GctRawToDigi/plugins/L1GctInternJetProducer.h

Author
Alex Tapper

Description: producer of L1Extra style internal GCT jets from Level-1 hardware objects.

Definition at line 29 of file L1GctInternJetProducer.h.

Constructor & Destructor Documentation

L1GctInternJetProducer::L1GctInternJetProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 33 of file L1GctInternJetProducer.cc.

33  :
34  internalJetSource_(iConfig.getParameter<edm::InputTag>("internalJetSource")),
35  centralBxOnly_(iConfig.getParameter<bool>("centralBxOnly"))
36 {
37  using namespace l1extra ;
38 
39  produces< L1JetParticleCollection >( "Internal" ) ;
40 }
T getParameter(std::string const &) const
L1GctInternJetProducer::~L1GctInternJetProducer ( )

Definition at line 43 of file L1GctInternJetProducer.cc.

43 {}

Member Function Documentation

void L1GctInternJetProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 107 of file L1GctInternJetProducer.cc.

107 {}
void L1GctInternJetProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 109 of file L1GctInternJetProducer.cc.

109 {}
math::PtEtaPhiMLorentzVector L1GctInternJetProducer::gctLorentzVector ( const double &  et,
const L1GctCand cand,
const L1CaloGeometry geom,
bool  central 
)
private
void L1GctInternJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 45 of file L1GctInternJetProducer.cc.

References centralBxOnly_, gather_cfg::cout, alignCSCRings::e, eta(), edm::EventSetup::get(), edm::Event::getByLabel(), i, internalJetSource_, LogDebug, phi, and edm::Event::put().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

46 {
47 
48  //std::cout << "ARGGHHH!" << std::endl;
49  using namespace edm ;
50  using namespace l1extra ;
51  using namespace std ;
52 
53  auto_ptr< L1JetParticleCollection > internJetColl(new L1JetParticleCollection );
54 
55  ESHandle< L1CaloGeometry > caloGeomESH ;
56  iSetup.get< L1CaloGeometryRecord >().get( caloGeomESH ) ;
57  const L1CaloGeometry* caloGeom = &( *caloGeomESH ) ;
58 
59  ESHandle< L1CaloEtScale > jetScale ;
60  iSetup.get< L1JetEtScaleRcd >().get( jetScale ) ;
61 
62  double etSumLSB = jetScale->linearLsb() ;
63  //std::cout << "Inside the Jet producer " << etSumLSB << std::endl;
64 
66  iEvent.getByLabel( internalJetSource_, hwIntJetCands ) ;
67  //std::cout << "At leas Something is happening" <<std::endl;
68  if( !hwIntJetCands.isValid() ) {
69  std::cout << "These aren't the Jets you're looking for" << std::endl;
70 
71  LogDebug("L1GctInternJetProducer")
72  << "\nWarning: L1GctJetCandCollection with " << internalJetSource_
73  << "\nrequested in configuration, but not found in the event."
74  << std::endl;
75 
76  } else {
77  //std::cout << "apparently the collection was found" <<std::endl;
78  L1GctInternJetDataCollection::const_iterator jetItr = hwIntJetCands->begin() ;
79  L1GctInternJetDataCollection::const_iterator jetEnd = hwIntJetCands->end() ;
80  int i;
81  for( i = 0 ; jetItr != jetEnd ; ++jetItr, ++i ){
82  //std::cout << " JetS a plenty" <<std::endl;
83  if( !jetItr->empty() &&
84  ( !centralBxOnly_ || jetItr->bx() == 0 ) ) {
85 
86 
87  double et = (jetItr->oflow() ?
88  (double) 0xfff:
89  (double) jetItr->et() ) * etSumLSB + 1.e-6;
90 
91  //double et = 10.;
92  //std::cout << "jetET: " << jetItr->et() <<std::endl;
93  //std::cout << "ET was: " << et << std::endl;
94  double eta = caloGeom->etaBinCenter( jetItr->regionId() );
95  double phi = caloGeom->emJetPhiBinCenter( jetItr->regionId() );
96 
97  internJetColl->push_back(L1JetParticle( math::PtEtaPhiMLorentzVector( et, eta, phi, 0.),
99  jetItr->bx() ) ) ;
100  }
101  }
102  }
103 
104  OrphanHandle< L1JetParticleCollection > internalJetHandle = iEvent.put( internJetColl, "Internal" ) ;
105 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
T eta() const
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:402
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10

Member Data Documentation

bool L1GctInternJetProducer::centralBxOnly_
private

Definition at line 46 of file L1GctInternJetProducer.h.

Referenced by produce().

edm::InputTag L1GctInternJetProducer::internalJetSource_
private

Definition at line 44 of file L1GctInternJetProducer.h.

Referenced by produce().