|
void | endJob () override |
|
| ObjectViewMatcher (const edm::ParameterSet &iConfig) |
|
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
|
virtual | ~ObjectViewMatcher () |
|
| EDProducer () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDProducer () |
|
| 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 () |
|
std::vector< ConsumesInfo > | consumesInfo () 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 (const std::string &iProcessName, std::vector< const char * > &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 () |
|
template<typename T1, typename T2>
class ObjectViewMatcher< T1, T2 >
Definition at line 51 of file ObjectViewMatcher.cc.
template<typename T1 , typename T2 >
Implements edm::EDProducer.
Definition at line 112 of file ObjectViewMatcher.cc.
References objects.IsoTrackAnalyzer::candidates, counter, deltaR(), reco::deltaR(), deltaRMax_(), edm::Event::getByToken(), nObjectsMatch_(), nObjectsTot_(), getGTfromDQMFile::obj, objCut_(), objMatchCut_(), and edm::Event::put().
114 std::auto_ptr<std::vector<T1> > cleanObjects(
new std::vector<T1 >);
119 bool* isMatch =
new bool[candidates->size()];
120 for (
unsigned int iObject=0;iObject<candidates->size();iObject++) isMatch[iObject] =
false;
126 if(objects->size()==0)
continue;
128 for (
unsigned int iObject=0;iObject<candidates->size();iObject++) {
129 const T1& candidate = candidates->at(iObject);
130 if (!
objCut_(candidate))
continue;
133 for (
unsigned int iObj=0;iObj<objects->size();iObj++) {
134 const T2&
obj = objects->at(iObj);
137 if (deltaR<
deltaRMax_) isMatch[iObject] =
true;
146 for (tIt = candidates->begin(); tIt != endcands; ++tIt, ++
counter) {
147 if(isMatch[counter]) cleanObjects->push_back( *tIt );
154 iEvent.
put(cleanObjects);
unsigned int nObjectsMatch_
unsigned int nObjectsTot_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
StringCutObjectSelector< T2, true > objMatchCut_
std::vector< edm::EDGetTokenT< edm::View< T2 > > > srcObjectsTokens_
double deltaR(const T1 &t1, const T2 &t2)
edm::EDGetTokenT< edm::View< T1 > > srcCandsToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double deltaR(double eta1, double eta2, double phi1, double phi2)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static std::atomic< unsigned int > counter
StringCutObjectSelector< T1, true > objCut_