#include <HITSiStripRawToClustersRoI.h>
Definition at line 36 of file HITSiStripRawToClustersRoI.h.
Definition at line 40 of file HITSiStripRawToClustersRoI.h.
Definition at line 42 of file HITSiStripRawToClustersRoI.h.
Definition at line 41 of file HITSiStripRawToClustersRoI.h.
Definition at line 43 of file HITSiStripRawToClustersRoI.h.
HITSiStripRawToClustersRoI::HITSiStripRawToClustersRoI | ( | const edm::ParameterSet & | conf | ) |
Definition at line 10 of file HITSiStripRawToClustersRoI.cc.
: cabling_(), allregions_(), nlayers_(conf.getUntrackedParameter<int>("layers",-1)), global_(conf.getUntrackedParameter<bool>("doGlobal",true)), random_(conf.getUntrackedParameter<bool>("random",false)), taujets_(conf.getUntrackedParameter<bool>("useTauJets",false)), ptrack_(conf.getUntrackedParameter<bool>("usePixelTracks",true)), siStripLazyGetter_(conf.getParameter<edm::InputTag>("siStripLazyGetter")), taujetL1_(conf.getParameter<edm::InputTag>("l1tauJetLabel")), ptrackLabel_(conf.getParameter<edm::InputTag>("pixelTrackLabel")), taujetdeta_(conf.getUntrackedParameter<double>("tjetEtaWindow",0.2)), taujetdphi_(conf.getUntrackedParameter<double>("tjetPhiWindow",0.2)), ptrackEta_(conf.getUntrackedParameter<double>("ptrackEtaWindow",0.3)), ptrackPhi_(conf.getUntrackedParameter<double>("ptrackPhiWindow",0.3)) { produces< RefGetter >(); }
HITSiStripRawToClustersRoI::~HITSiStripRawToClustersRoI | ( | ) |
Definition at line 31 of file HITSiStripRawToClustersRoI.cc.
{}
void HITSiStripRawToClustersRoI::beginJob | ( | void | ) | [virtual] |
void HITSiStripRawToClustersRoI::endJob | ( | void | ) | [virtual] |
bool HITSiStripRawToClustersRoI::physicalLayer | ( | SubDet & | subdet, |
uint32_t & | layer | ||
) | const [private] |
Defines allowed physical layer numbers
Definition at line 90 of file HITSiStripRawToClustersRoI.cc.
References nlayers_.
Referenced by ptracks(), random(), and taujets().
{ int signedlayer = static_cast<int>(SiStripRegionCabling::physicalLayer(subdet,layer)); return (nlayers_ == -1 || signedlayer < nlayers_) ? true : false; }
void HITSiStripRawToClustersRoI::produce | ( | edm::Event & | event, |
const edm::EventSetup & | setup | ||
) | [virtual] |
All regions
Random region number. Starts from 0.
Seeded by L1 taujets.
seeded by isol tracks
Implements edm::EDProducer.
Definition at line 37 of file HITSiStripRawToClustersRoI.cc.
References allregions_, cabling_, runEdmFileComparison::collection, SiStripRegionCabling::elementIndex(), edm::EventSetup::get(), global_, getHLTprescales::index, ptrack_, ptrackLabel_, ptracks(), random(), random_, siStripLazyGetter_, taujetL1_, taujets(), and taujets_.
{ setup.get<SiStripRegionCablingRcd>().get(cabling_); allregions_.reserve(cabling_->getRegionCabling().size()); for (uint32_t iregion=0;iregion<cabling_->getRegionCabling().size();iregion++) { for (uint32_t isubdet=0;isubdet<cabling_->getRegionCabling()[iregion].size();isubdet++) { for (uint32_t ilayer=0;ilayer<cabling_->getRegionCabling()[iregion][isubdet].size();ilayer++) { uint32_t index = SiStripRegionCabling::elementIndex(iregion,static_cast<SubDet>(isubdet),ilayer); allregions_.push_back(index); } } } edm::Handle< LazyGetter > lazygetter; event.getByLabel(siStripLazyGetter_,lazygetter); if (global_) { std::auto_ptr<RefGetter> globalrefgetter(new RefGetter(lazygetter,allregions_)); /*//unpack for (RefGetter::const_iterator iReg = globalrefgetter->begin(); iReg != globalrefgetter->end(); iReg++) *iReg;*/ event.put(globalrefgetter); return; } std::auto_ptr<RefGetter> refgetter(new RefGetter(allregions_.size())); refgetter->reserve(10000); if (random_) {random(*refgetter,lazygetter);} if (taujets_) { edm::Handle<l1extra::L1JetParticleCollection> collection; event.getByLabel(taujetL1_,collection); taujets(*collection,*refgetter,lazygetter); } if (ptrack_) { edm::Handle<trigger::TriggerFilterObjectWithRefs> collection; event.getByLabel(ptrackLabel_,collection); ptracks(*collection,*refgetter,lazygetter); } event.put(refgetter); }
void HITSiStripRawToClustersRoI::ptracks | ( | const trigger::TriggerFilterObjectWithRefs & | collection, |
RefGetter & | refgetter, | ||
edm::Handle< LazyGetter > & | lazygetter | ||
) | const [private] |
seeding by isolated pixel tracks
Definition at line 127 of file HITSiStripRawToClustersRoI.cc.
References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, cabling_, eta(), trigger::TriggerRefsCollections::getObjects(), L1TEmulatorMonitor_cff::p, phi, physicalLayer(), position, ptrackEta_, ptrackPhi_, and trigger::TriggerTrack.
Referenced by produce().
{ std::vector< edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs; collection.getObjects(trigger::TriggerTrack, isoPixTrackRefs); for (uint32_t p=0 ; p<isoPixTrackRefs.size(); p++) { Position position(isoPixTrackRefs[p]->track()->eta(),isoPixTrackRefs[p]->track()->phi()); for (uint32_t isubdet = 0; isubdet < SiStripRegionCabling::ALLSUBDETS; isubdet++) { SubDet subdet = static_cast<SubDet>(isubdet); for (uint32_t ilayer = 0; ilayer < SiStripRegionCabling::ALLLAYERS; ilayer++) { if (!physicalLayer(subdet,ilayer)) break; cabling_->updateSiStripRefGetter<SiStripCluster>(refgetter,lazygetter,position,ptrackEta_,ptrackPhi_,subdet,ilayer); } } } }
void HITSiStripRawToClustersRoI::random | ( | RefGetter & | refgetter, |
edm::Handle< LazyGetter > & | lazygetter | ||
) | const [private] |
Defines regions of interest randomly
Definition at line 95 of file HITSiStripRawToClustersRoI.cc.
References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, cabling_, SiStripRegionCabling::elementIndex(), physicalLayer(), and pileupDistInMC::total.
Referenced by produce().
{ uint32_t total = cabling_->getRegionCabling().size(); uint32_t required = static_cast<uint32_t>(CLHEP::RandFlat::shoot()*(total+1)); for (uint32_t iregion = 0; iregion < required; iregion++) { for (uint32_t isubdet = 0; isubdet < SiStripRegionCabling::ALLSUBDETS; isubdet++) { SubDet subdet = static_cast<SubDet>(isubdet); for (uint32_t ilayer = 0; ilayer < SiStripRegionCabling::ALLLAYERS; ilayer++) { if (!physicalLayer(subdet,ilayer)) break; cabling_->updateSiStripRefGetter<SiStripCluster>(refgetter,lazygetter,SiStripRegionCabling::elementIndex(iregion,subdet,ilayer)); } } } }
void HITSiStripRawToClustersRoI::taujets | ( | const l1extra::L1JetParticleCollection & | collection, |
RefGetter & | refgetter, | ||
edm::Handle< LazyGetter > & | lazygetter | ||
) | const [private] |
Defines regions of interest by taujets
Definition at line 111 of file HITSiStripRawToClustersRoI.cc.
References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, cabling_, physicalLayer(), position, taujetdeta_, and taujetdphi_.
Referenced by produce().
{ l1extra::L1JetParticleCollection::const_iterator icollection = collection.begin(); for (; icollection!=collection.end(); icollection++) { Position position(icollection->eta(),icollection->phi()); for (uint32_t isubdet = 0; isubdet < SiStripRegionCabling::ALLSUBDETS; isubdet++) { SubDet subdet = static_cast<SubDet>(isubdet); for (uint32_t ilayer = 0; ilayer < SiStripRegionCabling::ALLLAYERS; ilayer++) { if (!physicalLayer(subdet,ilayer)) break; cabling_->updateSiStripRefGetter<SiStripCluster>(refgetter,lazygetter,position,taujetdeta_,taujetdphi_,subdet,ilayer); } } } }
std::vector<uint32_t> HITSiStripRawToClustersRoI::allregions_ [private] |
Record of all region numbers
Definition at line 70 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
bool HITSiStripRawToClustersRoI::global_ [private] |
Booleans to define objects of interest
Definition at line 76 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
int HITSiStripRawToClustersRoI::nlayers_ [private] |
Layers of SST to unpack (from innermost)
Definition at line 73 of file HITSiStripRawToClustersRoI.h.
Referenced by physicalLayer().
bool HITSiStripRawToClustersRoI::ptrack_ [private] |
Definition at line 79 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
double HITSiStripRawToClustersRoI::ptrackEta_ [private] |
Definition at line 90 of file HITSiStripRawToClustersRoI.h.
Referenced by ptracks().
Definition at line 84 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
double HITSiStripRawToClustersRoI::ptrackPhi_ [private] |
Definition at line 91 of file HITSiStripRawToClustersRoI.h.
Referenced by ptracks().
bool HITSiStripRawToClustersRoI::random_ [private] |
Definition at line 77 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
reco module labels to define regions of interest
Definition at line 82 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
double HITSiStripRawToClustersRoI::taujetdeta_ [private] |
deta/dphi to define regions of interest around physics objects
Definition at line 88 of file HITSiStripRawToClustersRoI.h.
Referenced by taujets().
double HITSiStripRawToClustersRoI::taujetdphi_ [private] |
Definition at line 89 of file HITSiStripRawToClustersRoI.h.
Referenced by taujets().
Definition at line 83 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().
bool HITSiStripRawToClustersRoI::taujets_ [private] |
Definition at line 78 of file HITSiStripRawToClustersRoI.h.
Referenced by produce().