CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CaloTowerCreatorForTauHLT Class Reference

#include <CaloTowerCreatorForTauHLT.h>

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

List of all members.

Public Member Functions

 CaloTowerCreatorForTauHLT (const edm::ParameterSet &)
 constructor from parameter set
 ~CaloTowerCreatorForTauHLT ()
 destructor

Private Member Functions

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

Private Attributes

double mCone
 use only towers in cone mCone around L1 candidate for regional jet reco
double mEThreshold
 E threshold.
double mEtThreshold
 ET threshold.
edm::InputTag ml1seeds
 imitator of L1 seeds
int mTauId
edm::InputTag mTauTrigger
 label of tau trigger type analysis
edm::InputTag mtowers
 label of source collection
int mVerbose
 verbosity

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 27 of file CaloTowerCreatorForTauHLT.h.


Constructor & Destructor Documentation

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

constructor from parameter set

Definition at line 23 of file CaloTowerCreatorForTauHLT.cc.

  :
  mVerbose (p.getUntrackedParameter<int> ("verbose", 0)),
  mtowers (p.getParameter<InputTag> ("towers")),
  mCone (p.getParameter<double> ("UseTowersInCone")),
  mTauTrigger (p.getParameter<InputTag> ("TauTrigger")),
//  ml1seeds (p.getParameter<InputTag> ("l1seeds")),
  mEtThreshold (p.getParameter<double> ("minimumEt")),
  mEThreshold (p.getParameter<double> ("minimumE")),
  mTauId (p.getParameter<int> ("TauId"))
{
  produces<CaloTowerCollection>();
}
CaloTowerCreatorForTauHLT::~CaloTowerCreatorForTauHLT ( )

destructor

Definition at line 37 of file CaloTowerCreatorForTauHLT.cc.

                                                      {
}

Member Function Documentation

void CaloTowerCreatorForTauHLT::produce ( edm::Event e,
const edm::EventSetup  
) [private, virtual]

process one event

Implements edm::EDProducer.

Definition at line 40 of file CaloTowerCreatorForTauHLT.cc.

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

                                                                       {
  edm::Handle<CaloTowerCollection> caloTowers;
  evt.getByLabel( mtowers, caloTowers );

  // imitate L1 seeds
  edm::Handle<L1JetParticleCollection> jetsgen;
  evt.getByLabel(mTauTrigger, jetsgen);
  std::auto_ptr<CaloTowerCollection> cands( new CaloTowerCollection );
  cands->reserve( caloTowers->size() );
  
  int idTau =0;
  L1JetParticleCollection::const_iterator myL1Jet = jetsgen->begin();
  for(;myL1Jet != jetsgen->end();myL1Jet++)
    {
      if(idTau == mTauId)
        {
          double Sum08 = 0.;
          
          unsigned idx = 0;
          for (; idx < caloTowers->size(); idx++) {
            const CaloTower* cal = &((*caloTowers) [idx]);
            if (mVerbose == 2) {
              std::cout << "CaloTowerCreatorForTauHLT::produce-> " << idx << " tower et/eta/phi/e: " 
                        << cal->et() << '/' << cal->eta() << '/' << cal->phi() << '/' << cal->energy() << " is...";
            }
            if (cal->et() >= mEtThreshold && cal->energy() >= mEThreshold ) {
              math::PtEtaPhiELorentzVector p( cal->et(), cal->eta(), cal->phi(), cal->energy() );
              double delta  = ROOT::Math::VectorUtil::DeltaR((*myL1Jet).p4().Vect(), p);
              
              if(delta < mCone) {
                Sum08 += cal->et(); 
                cands->push_back( *cal );
              }
            }
            else {
              if (mVerbose == 2) std::cout << "rejected " << std::endl;
            }
          }

        }
      idTau++;
    }

  evt.put( cands );
  
}

Member Data Documentation

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

Definition at line 42 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

E threshold.

Definition at line 50 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

ET threshold.

Definition at line 48 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

imitator of L1 seeds

Definition at line 46 of file CaloTowerCreatorForTauHLT.h.

Definition at line 53 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

label of tau trigger type analysis

Definition at line 44 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

label of source collection

Definition at line 40 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

verbosity

Definition at line 38 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().