On 7/29/13 3:11 PM, yetkinyilmaz wrote:
> In DataFormats/HeavyIonEvent/interface/VoronoiBackground.h:
> 
>> +  double pt_corrected;
>> +
>> +  double mt_preeq;
>> +  double mt_posteq;
>> +  double mt_corrected;
>> +
>> +  double voronoi_area;
>> +  //RefVector of neighbors...
>> +
>> +};
>> +
>> +
>> + // typedef edm::AssociationMap<edm::OneToValue<reco::PFCandidateCollection, reco::VoronoiBackground> > VoronoiBackgroundMap;
>> + // typedef edm::AssociationMap<edm::OneToValue<reco::CandidateCollection, reco::VoronoiBackground> > VoronoiBackgroundMap;
>> +
>> + typedef edm::AssociationMap<edm::OneToValue<reco::CandidateView, reco::VoronoiBackground> > VoronoiBackgroundMap;
> 
> Hi Slava; I prefered AssociationMap because there was good enough
> documentation available for it.
> https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookAssociationMap
> Indeed, ValueMap may be better, but is there such documentation for it
> as well? 

I'd just pick an example code in lxr, and follow from there.
This should be a simple enough example
https://cmssdt.cern.ch/SDT/lxr/source/RecoEgamma/EgammaIsolationAlgos/plugins/EgammaTowerIsolationProducer.cc#038


> Would it be compatible with the cases where the mapped
> Candidate collection is filtered after creating the map?


Please clarify how you plan to filter.
Will this be a vector of pointers to an old collection,
or will you store copies of original candidates in a new candidate
collection?
In the latter case, the history is lost and the map will have to be redone
to still be meaningful.

Cheers

		--slava

> Thanks.
> … <#>
> On Jul 29, 2013, at 3:00 PM, slava77 wrote: In
> DataFormats/HeavyIonEvent/interface/VoronoiBackground.h: > + double
> pt_corrected; > + > + double mt_preeq; > + double mt_posteq; > + double
> mt_corrected; > + > + double voronoi_area; > + //RefVector of
> neighbors... > + > +}; > + > + > + // typedef
> edm::AssociationMap<edm::OneToValue<reco::PFCandidateCollection,
> reco::VoronoiBackground> > VoronoiBackgroundMap; > + // typedef
> edm::AssociationMap<edm::OneToValue<reco::CandidateCollection,
> reco::VoronoiBackground> > VoronoiBackgroundMap; > + > + typedef
> edm::AssociationMap<edm::OneToValue<reco::CandidateView,
> reco::VoronoiBackground> > VoronoiBackgroundMap; AssociationMap should
> be avoided for performance reasons. If every PFCandidate in the
> reference collection has a VoronoiBackground computed, then use ValueMap
> — Reply to this email directly or view it on GitHub.
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/189/files#r5448919>.
> 

-- 
***********************************************************************
 Vyacheslav (Slava) Krutelyov
 TAMU: Physics Dept Texas A&M MS4242, College Station, TX 77843-4242
 CERN: 42-R-027
 AIM/Skype: siava16              googleTalk: slava77@gmail.com
 (630) 291-5128  Cell (US)       +41 76 275 7116 Cell (CERN)

-----------------------------------------------------------------------