CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CaloTowerCreatorForTauHLT Class Reference

#include <CaloTowerCreatorForTauHLT.h>

Inheritance diagram for CaloTowerCreatorForTauHLT:
edm::global::EDProducer<> edm::global::EDProducerBase 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::global::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &desc)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::StreamID sid, edm::Event &evt, const edm::EventSetup &stp) const override
 process one event More...
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 31 of file CaloTowerCreatorForTauHLT.h.

Constructor & Destructor Documentation

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

constructor from parameter set

Definition at line 21 of file CaloTowerCreatorForTauHLT.cc.

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

destructor

Definition at line 34 of file CaloTowerCreatorForTauHLT.cc.

34  {
35 }

Member Function Documentation

void CaloTowerCreatorForTauHLT::fillDescriptions ( edm::ConfigurationDescriptions desc)
static

Definition at line 88 of file CaloTowerCreatorForTauHLT.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_25ns10e33_v2_cff::InputTag, edm::ConfigurationDescriptions::setComment(), and edm::ParameterDescriptionNode::setComment().

88  {
89 
91  aDesc.add<edm::InputTag>("TauTrigger",edm::InputTag("l1extraParticles","Tau"))->setComment("L1ExtraJet collection for seeding");
92  aDesc.add<int>("TauId",0)->setComment("Item from L1ExtraJet collection used for seeding");
93  aDesc.add<edm::InputTag>("towers",edm::InputTag("towerMaker"))->setComment("Input tower collection");
94  aDesc.add<double>("UseTowersInCone",0.8)->setComment("Radius of cone around seed");
95  aDesc.add<double>("minimumE",0.8)->setComment("Minimum tower energy");
96  aDesc.add<double>("minimumEt",0.5)->setComment("Minimum tower ET");
97  aDesc.addUntracked<int>("verbose",0)->setComment("Verbosity level; 0=silent");
98  desc.setComment("Produce tower collection around L1ExtraJetParticle seed.");
99  desc.add("caloTowerMakerHLT",aDesc);
100 
101 }
void setComment(std::string const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void CaloTowerCreatorForTauHLT::produce ( edm::StreamID  sid,
edm::Event evt,
const edm::EventSetup stp 
) const
overrideprivatevirtual

process one event

Implements edm::global::EDProducerBase.

Definition at line 37 of file CaloTowerCreatorForTauHLT.cc.

References HLT_25ns10e33_v2_cff::caloTowers, delta, HLT_25ns10e33_v2_cff::DeltaR, 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  bool isAccepted = false;
60  if (mVerbose == 2) {
61  edm::LogInfo("JetDebugInfo") << "CaloTowerCreatorForTauHLT::produce-> " << idx << " tower et/eta/phi/e: "
62  << cal->et() << '/' << cal->eta() << '/' << cal->phi() << '/' << cal->energy() << " is...";
63  }
64  if (cal->et() >= mEtThreshold && cal->energy() >= mEThreshold ) {
65  math::PtEtaPhiELorentzVector p( cal->et(), cal->eta(), cal->phi(), cal->energy() );
66  double delta = ROOT::Math::VectorUtil::DeltaR((*myL1Jet).p4().Vect(), p);
67 
68  if(delta < mCone) {
69  isAccepted = true;
70  Sum08 += cal->et();
71  cands->push_back( *cal );
72  }
73  }
74  if (mVerbose == 2){
75  if (isAccepted) edm::LogInfo("JetDebugInfo") << "accepted \n";
76  else edm::LogInfo("JetDebugInfo") << "rejected \n";
77  }
78  }
79 
80  }
81  idTau++;
82  }
83 
84  evt.put( cands );
85 
86 }
dbl * delta
Definition: mlp_gen.cc:36
virtual double energy() const final
energy
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
virtual double phi() const final
momentum azimuthal angle
const double mCone
use only towers in cone mCone around L1 candidate for regional jet reco
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
const edm::EDGetTokenT< l1extra::L1JetParticleCollection > mTauTrigger_token
label of tau trigger type analysis
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...
const edm::EDGetTokenT< CaloTowerCollection > mtowers_token
label of source collection
double et(double vtxZ) const
Definition: CaloTower.h:129
virtual double eta() const final
momentum pseudorapidity
const double mEThreshold
E threshold.
const double mEtThreshold
imitator of L1 seeds

Member Data Documentation

const double CaloTowerCreatorForTauHLT::mCone
private

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

Definition at line 49 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

const double CaloTowerCreatorForTauHLT::mEThreshold
private

E threshold.

Definition at line 57 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

const double CaloTowerCreatorForTauHLT::mEtThreshold
private

imitator of L1 seeds

ET threshold

Definition at line 55 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

const int CaloTowerCreatorForTauHLT::mTauId
private

Definition at line 59 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

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

label of tau trigger type analysis

Definition at line 51 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

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

label of source collection

Definition at line 47 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

const int CaloTowerCreatorForTauHLT::mVerbose
private

verbosity

Definition at line 45 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().