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

#include <CaloTowerCreatorForTauHLT.h>

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

Public Member Functions

 CaloTowerCreatorForTauHLT (const edm::ParameterSet &)
 constructor from parameter set More...
 
 ~CaloTowerCreatorForTauHLT ()
 destructor More...
 
- 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

void produce (edm::Event &e, const edm::EventSetup &) override
 process one event More...
 

Private Attributes

double mCone
 use only towers in cone mCone around L1 candidate for regional jet reco More...
 
double mEThreshold
 E threshold. More...
 
double mEtThreshold
 imitator of L1 seeds More...
 
int mTauId
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
mTauTrigger_token
 label of tau trigger type analysis More...
 
edm::EDGetTokenT
< CaloTowerCollection
mtowers_token
 label of source collection More...
 
int mVerbose
 verbosity More...
 

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

Framework module that produces a collection of calo towers in the region of interest for Tau HLT reconnstruction, depending on tau type trigger: Tau1 - take location of 1st L1 Tau Tau2 - take location of 2nd L1 Tau; if does not exists, take location of 1st Calo Tower ETau - take L1 Tau candidate which is not collinear to HLT (or L1) electron candidate.

Author
A. Nikitenko. IC. based on L. Lista and J. Mans

Definition at line 29 of file CaloTowerCreatorForTauHLT.h.

Constructor & Destructor Documentation

CaloTowerCreatorForTauHLT::CaloTowerCreatorForTauHLT ( const edm::ParameterSet p)

constructor from parameter set

Definition at line 20 of file CaloTowerCreatorForTauHLT.cc.

References edm::ParameterSet::getParameter(), mTauTrigger_token, and mtowers_token.

21  :
22  mVerbose (p.getUntrackedParameter<int> ("verbose", 0)),
23  mCone (p.getParameter<double> ("UseTowersInCone")),
24  mEtThreshold (p.getParameter<double> ("minimumEt")),
25  mEThreshold (p.getParameter<double> ("minimumE")),
26  mTauId (p.getParameter<int> ("TauId"))
27 {
28  mtowers_token = consumes<CaloTowerCollection>(p.getParameter<InputTag>("towers") );
29  mTauTrigger_token = consumes<L1JetParticleCollection>(p.getParameter<InputTag>("TauTrigger") );
30 
31  produces<CaloTowerCollection>();
32 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< l1extra::L1JetParticleCollection > mTauTrigger_token
label of tau trigger type analysis
double mEtThreshold
imitator of L1 seeds
double mCone
use only towers in cone mCone around L1 candidate for regional jet reco
edm::EDGetTokenT< CaloTowerCollection > mtowers_token
label of source collection
CaloTowerCreatorForTauHLT::~CaloTowerCreatorForTauHLT ( )

destructor

Definition at line 34 of file CaloTowerCreatorForTauHLT.cc.

34  {
35 }

Member Function Documentation

void CaloTowerCreatorForTauHLT::produce ( edm::Event e,
const edm::EventSetup  
)
overrideprivatevirtual

process one event

Implements edm::EDProducer.

Definition at line 37 of file CaloTowerCreatorForTauHLT.cc.

References HiRecoJets_cff::caloTowers, gather_cfg::cout, delta, reco::LeafCandidate::energy(), CaloTower::et(), reco::LeafCandidate::eta(), edm::Event::getByToken(), customizeTrackingMonitorSeedNumber::idx, mCone, mEThreshold, mEtThreshold, mTauId, mTauTrigger_token, mtowers_token, mVerbose, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::phi(), and edm::Event::put().

37  {
39  evt.getByToken( mtowers_token, caloTowers );
40 
41  // imitate L1 seeds
43  evt.getByToken( mTauTrigger_token, jetsgen);
44 
45  std::auto_ptr<CaloTowerCollection> cands( new CaloTowerCollection );
46  cands->reserve( caloTowers->size() );
47 
48  int idTau =0;
49  L1JetParticleCollection::const_iterator myL1Jet = jetsgen->begin();
50  for(;myL1Jet != jetsgen->end();myL1Jet++)
51  {
52  if(idTau == mTauId)
53  {
54  double Sum08 = 0.;
55 
56  unsigned idx = 0;
57  for (; idx < caloTowers->size(); idx++) {
58  const CaloTower* cal = &((*caloTowers) [idx]);
59  if (mVerbose == 2) {
60  std::cout << "CaloTowerCreatorForTauHLT::produce-> " << idx << " tower et/eta/phi/e: "
61  << cal->et() << '/' << cal->eta() << '/' << cal->phi() << '/' << cal->energy() << " is...";
62  }
63  if (cal->et() >= mEtThreshold && cal->energy() >= mEThreshold ) {
64  math::PtEtaPhiELorentzVector p( cal->et(), cal->eta(), cal->phi(), cal->energy() );
65  double delta = ROOT::Math::VectorUtil::DeltaR((*myL1Jet).p4().Vect(), p);
66 
67  if(delta < mCone) {
68  Sum08 += cal->et();
69  cands->push_back( *cal );
70  }
71  }
72  else {
73  if (mVerbose == 2) std::cout << "rejected " << std::endl;
74  }
75  }
76 
77  }
78  idTau++;
79  }
80 
81  evt.put( cands );
82 
83 }
dbl * delta
Definition: mlp_gen.cc:36
edm::EDGetTokenT< l1extra::L1JetParticleCollection > mTauTrigger_token
label of tau trigger type analysis
virtual float phi() const
momentum azimuthal angle
double mEtThreshold
imitator of L1 seeds
virtual double energy() const
energy
double mCone
use only towers in cone mCone around L1 candidate for regional jet reco
virtual float eta() const
momentum pseudorapidity
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
tuple cout
Definition: gather_cfg.py:121
double et(double vtxZ) const
Definition: CaloTower.h:116
edm::EDGetTokenT< CaloTowerCollection > mtowers_token
label of source collection

Member Data Documentation

double CaloTowerCreatorForTauHLT::mCone
private

use only towers in cone mCone around L1 candidate for regional jet reco

Definition at line 44 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

double CaloTowerCreatorForTauHLT::mEThreshold
private

E threshold.

Definition at line 52 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

double CaloTowerCreatorForTauHLT::mEtThreshold
private

imitator of L1 seeds

ET threshold

Definition at line 50 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

int CaloTowerCreatorForTauHLT::mTauId
private

Definition at line 55 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> CaloTowerCreatorForTauHLT::mTauTrigger_token
private

label of tau trigger type analysis

Definition at line 46 of file CaloTowerCreatorForTauHLT.h.

Referenced by CaloTowerCreatorForTauHLT(), and produce().

edm::EDGetTokenT<CaloTowerCollection> CaloTowerCreatorForTauHLT::mtowers_token
private

label of source collection

Definition at line 42 of file CaloTowerCreatorForTauHLT.h.

Referenced by CaloTowerCreatorForTauHLT(), and produce().

int CaloTowerCreatorForTauHLT::mVerbose
private

verbosity

Definition at line 40 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().