CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EGRefinedSCFixer.cc
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterProducers_EGRefinedSCFixer_h
2 #define RecoEcal_EgammaClusterProducers_EGRefinedSCFixer_h
3 
18 
19 #include <unordered_set>
20 #include <iostream>
21 
22 
23 //issue: we need to re-make the refined superclusters in the AOD
24 //problem: to do this properly, we need the outer position of the track, not stored in AOD
25 // so we cant re-run PFEGammaProducer which would normally do this
26 //solution: we fudge it in the following way
27 
28 //how it works:
29 // a refined supercluster will have subclusters added or removed w.r.t to its parent SC
30 // we cant remake them in AOD (yet)
31 // so we take the existing refined superclusters and see what sub clusters are removed/added
32 // and then when we take our new fixed superclusters, we add or remove those clusters
33 // we id clusters via seed crystal, this shouldnt change for any cluster without a gain switch,
34 // its still a local maximum
35 //
36 // it is important to know that for the digis to be saved in miniAOD, it must be within the 3x3
37 // of a hybrid (or multi 5x5 in endcap) supercluster seed crystal. The hybrid supercluster seed
38 // crystals should map well to the PF supercluster seed crystal, particularly for isolated high
39 // energy e/gamma objects
40 //
41 // for matching the new fixed superclusters vs old superclusters, the seed crystal may gain
42 // as the gain switched crystal will now have a larger energy
43 // but it really should be in the 3x3 of the orginal SC (the gain switch crysal has to be here to be redone)
44 // so we do a dIR = dIEta^2 + dIPhi^2 match of <=2 (ie be in the 3x3)
45 // but take the smallest dIR
46 
47 // issues: sub cluster ordering may not be correct (its sorted by decreasing energy)
48 
50 public:
51  explicit EGRefinedSCFixer(const edm::ParameterSet& );
52  virtual ~EGRefinedSCFixer(){}
53  virtual void produce(edm::Event &, const edm::EventSetup &);
54 
56  makeFixedRefinedSC(const reco::SuperCluster& orgRefinedSC,
57  const reco::SuperCluster& orgSC,
58  const reco::SuperCluster& fixedSC);
59 
60 
61  static std::vector<edm::Ptr<reco::CaloCluster> >
63  const reco::SuperCluster& rhs);
64 
65 
66 
67  static std::unordered_set<unsigned>
69  const reco::SuperCluster& orgSC,
70  const reco::SuperCluster& fixedSC,
71  const std::vector<edm::Ptr<reco::CaloCluster> >& clustersAddedToAnySC);
72 
73  static std::vector<edm::Ptr<reco::PFCluster> >
74  getClustersFromSeedIds(const std::unordered_set<unsigned>& seedIds,const edm::Handle<reco::PFClusterCollection >& inClusters);
75 
76  static reco::SuperCluster
77  makeFixedRefinedBarrelSC(const reco::SuperCluster& orgRefinedSC,
78  const reco::SuperCluster& orgSC,
79  const reco::SuperCluster& fixedSC,
80  const edm::Handle<reco::PFClusterCollection >& fixedClusters,
81  const std::vector<edm::Ptr<reco::CaloCluster> >& clustersAddedToAnySC);
82 
83 private:
86 
87  template<typename T>
89  auto tag(pset.getParameter<edm::InputTag>(label));
90  if (!instance.empty())
91  tag = edm::InputTag(tag.label(), instance, tag.process());
92 
93  token = consumes<T>(tag);
94  }
95 
96  // outputs from PFEGammaProducer
98  edm::EDGetTokenT<reco::CaloClusterCollection> orgBCToken_; // original basic clusters (EB&EE)
101  // outputs from PFECALSuperClusterProducer
103  // outputs from gs-fixed PFECALSuperClusterProducer
105  // output from gs-fixed particleFlowClusterECAL
107 
108  // output instance name of EB/EE BC collection
110  // output instance name of ES BC collection
112 
113  //if this is true, throw on duplicate clusters entering the event
114  //if false, we flags the event and move on
117 
118 };
119 
121  ebeeClustersCollection_("EBEEClusters"),
122  esClustersCollection_("ESClusters"),
123  throwOnDupECALClustersInEvent_(iConfig.getParameter<bool>("throwOnDupECALClustersInEvent")),
124  throwOnDupESClustersInEvent_(iConfig.getParameter<bool>("throwOnDupESClustersInEvent"))
125 
126 {
127  getToken(orgRefinedSCToken_, iConfig, "orgRefinedSC");
128  getToken(orgBCToken_, iConfig, "orgRefinedSC", "EBEEClusters");
129  getToken(orgESToken_, iConfig, "orgRefinedSC", "ESClusters");
130  getToken(orgConvToken_, iConfig, "orgRefinedSC");
131  getToken(orgSCToken_[0], iConfig, "orgSC", "particleFlowSuperClusterECALBarrel");
132  getToken(orgSCToken_[1], iConfig, "orgSC", "particleFlowSuperClusterECALEndcapWithPreshower");
133  getToken(fixedSCToken_[0], iConfig, "fixedSC", "particleFlowSuperClusterECALBarrel");
134  getToken(fixedSCToken_[1], iConfig, "fixedSC", "particleFlowSuperClusterECALEndcapWithPreshower");
135  getToken(fixedPFClustersToken_, iConfig, "fixedPFClusters");
136 
137  produces<reco::SuperClusterCollection>();
138  produces<reco::CaloClusterCollection>(ebeeClustersCollection_);
139  produces<reco::CaloClusterCollection>(esClustersCollection_);
140  produces<reco::ConversionCollection>();
141 
142  // products not in PFEGammaProducer; provide mapping from new to old objects
143  produces<SCRefMap>();
144  produces<SCRefMap>("parentSCsEB");
145  produces<SCRefMap>("parentSCsEE");
146  //flags to tell us if we have duplicate clusters
147  produces<bool>("dupECALClusters");
148  produces<bool>("dupESClusters");
149 }
150 
151 namespace {
152  template<typename T>
154  getHandle(const edm::Event& iEvent, const edm::EDGetTokenT<T>& token)
155  {
157  iEvent.getByToken(token, handle);
158  return handle;
159  }
160 }
161 
163 {
164  auto const& orgRefinedSCs = getHandle(iEvent, orgRefinedSCToken_);
165  auto const& orgBCs = getHandle(iEvent, orgBCToken_);
166  auto const& orgESs = getHandle(iEvent, orgESToken_);
167  auto const& orgConvs = getHandle(iEvent, orgConvToken_);
168  auto const& orgEBSCs = getHandle(iEvent,orgSCToken_[0]);
169  auto const& orgEESCs = getHandle(iEvent,orgSCToken_[1]);
170  auto const& fixedEBSCs = getHandle(iEvent,fixedSCToken_[0]);
171  auto const& fixedEESCs = getHandle(iEvent,fixedSCToken_[1]);
172  auto const& fixedPFClusters = getHandle(iEvent,fixedPFClustersToken_);
173 
174  auto fixedRefinedSCs = std::make_unique<reco::SuperClusterCollection>();
175  // EB clusters are fixed, EE are direct translation from the original
176  auto fixedBCs = std::make_unique<reco::CaloClusterCollection>();
177  // direct translation of the original ES collection - there is nothing "fixed" about this
178  // however they may be slightly different as we are reclustering from reduced rec-hit collections
179  // this will mainly effect non-photon or non-electron superclusters as those superclusters
180  // save less rec-hits surrounding them
181  auto fixedESs = std::make_unique<reco::CaloClusterCollection>();
182  auto fixedConvs = std::make_unique<reco::ConversionCollection>();
183 
184  std::vector<reco::SuperClusterRef> mappedRefinedSCs;
185  std::vector<reco::SuperClusterRef> mappedSCsEB(fixedEBSCs->size());
186  std::vector<reco::SuperClusterRef> mappedSCsEE(fixedEESCs->size());
187 
188  std::vector<edm::Ptr<reco::CaloCluster> > clusterAddedToAnyEBSC;
189  for(auto& refinedSC : *orgRefinedSCs){
190  if(refinedSC.seed()->seed().subdetId() == EcalBarrel) {
191  reco::SuperClusterRef parentSC = GainSwitchTools::matchSCBySeedCrys(refinedSC,orgEBSCs);
192  if(parentSC.isNonnull()) {
193  auto const& clusAdded = getSubClustersMissing(refinedSC,*parentSC);
194  for(auto clusPtr : clusAdded) clusterAddedToAnyEBSC.push_back(clusPtr);
195  }else{ //no parent supercluster, all superclusters in this supercluster are addded
196  for(auto clusPtr : refinedSC.clusters()) clusterAddedToAnyEBSC.push_back(clusPtr);
197  }
198  }
199  }
200 
201  for (unsigned iO(0); iO != orgRefinedSCs->size(); ++iO) {
202  auto& orgRefinedSC(orgRefinedSCs->at(iO));
203  mappedRefinedSCs.emplace_back(orgRefinedSCs, iO);
204 
205  // find the PFSuperCluster for this refined SC
206  if (orgRefinedSC.seed()->seed().subdetId() == EcalBarrel) {
207  auto orgEBSC(GainSwitchTools::matchSCBySeedCrys(orgRefinedSC, orgEBSCs));
208 
209  // particleFlowEGamma can create superclusters directly out of PFClusters too
210  // -> there is not always a matching EB SC
211  if (orgEBSC.isNonnull()) {
212  auto fixedEBSC(GainSwitchTools::matchSCBySeedCrys(*orgEBSC, fixedEBSCs, 1, 1));
213  if (fixedEBSC.isNonnull()) {
214  mappedSCsEB[fixedEBSC.key()] = orgEBSC;
215 
216  auto fixedRefinedSC(makeFixedRefinedBarrelSC(orgRefinedSC, *orgEBSC, *fixedEBSC, fixedPFClusters,clusterAddedToAnyEBSC));
217  fixedRefinedSCs->push_back(fixedRefinedSC);
218 
219  continue;
220  }
221  }
222  }
223  else {
224  auto orgEESC(GainSwitchTools::matchSCBySeedCrys(orgRefinedSC, orgEESCs));
225  if (orgEESC.isNonnull()) {
226  //there is nothing "fixed" here - two clusters are in theory identical but
227  //there could be mild differences given we are clustering from the
228  //reduced rec-hit collecitons
229  //for example this can lead to small energy changes leading a cluster to be
230  //now below the 4 GeV Et threshold to make a supercluster and therefore disappear
231  auto fixedEESC(GainSwitchTools::matchSCBySeedCrys(*orgEESC, fixedEESCs));
232  if(fixedEESC.isNonnull()) mappedSCsEE[fixedEESC.key()] = orgEESC;
233  }
234  }
235 
236  // if EE or no PFSuperCluster match
237  fixedRefinedSCs->push_back(orgRefinedSC);
238  }
239 
240 
241  // Put the PF SC maps in Event
242  std::auto_ptr<SCRefMap> pEBSCRefMap(new SCRefMap);
243  SCRefMap::Filler ebSCMapFiller(*pEBSCRefMap);
244  ebSCMapFiller.insert(fixedEBSCs, mappedSCsEB.begin(), mappedSCsEB.end());
245  ebSCMapFiller.fill();
246  iEvent.put(pEBSCRefMap, "parentSCsEB");
247 
248  std::auto_ptr<SCRefMap> pEESCRefMap(new SCRefMap);
249  SCRefMap::Filler eeSCMapFiller(*pEESCRefMap);
250  eeSCMapFiller.insert(fixedEESCs, mappedSCsEE.begin(), mappedSCsEE.end());
251  eeSCMapFiller.fill();
252  iEvent.put(pEESCRefMap, "parentSCsEE");
253 
254  // Copy basic clusters
255  std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEBEE; //maps of pfclusters to caloclusters
256  std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapES;
257 
258  bool duplicateECALClusters=false;
259  bool duplicateESClusters=false;
260  for (auto& sc : *fixedRefinedSCs) {
261  // The cluster ref in fixed EB and the other superclusters point to different collections (former to gs-fixed, latter to original)
262  // but we are copying the basic clusters by value and remaking yet another collection here -> no need to distinguish
263  for (auto&& cItr(sc.clustersBegin()); cItr != sc.clustersEnd(); ++cItr) {
264  auto& ptr(*cItr);
265  if (pfClusterMapEBEE.count(ptr) == 0) {
266  pfClusterMapEBEE[ptr] = fixedBCs->size();
267  fixedBCs->emplace_back(*ptr);
268  }
269  else{
270  duplicateECALClusters=true;
272  throw cms::Exception("EGRefinedSCFixer::produce")
273  << "Found an EB/EE pfcluster matched to more than one supercluster!";
274  }
275  }
276  }
277 
278  for (auto&& cItr = sc.preshowerClustersBegin(); cItr!=sc.preshowerClustersEnd(); ++cItr) {
279  auto& ptr(*cItr);
280  if (pfClusterMapES.count(ptr) == 0) {
281  pfClusterMapES[ptr] = fixedESs->size();
282  fixedESs->emplace_back(*ptr);
283  }
284  else{
285  duplicateESClusters=true;
287  throw cms::Exception("PFEgammaProducer::produce")
288  << "Found an ES pfcluster matched to more than one supercluster!";
289  }
290  }
291  }
292  }
293  iEvent.put(std::make_unique<bool>(duplicateECALClusters),"dupECALClusters");
294  iEvent.put(std::make_unique<bool>(duplicateESClusters),"dupESClusters");
295 
296  //put calocluster output collections in event and get orphan handles to create ptrs
297  auto caloClusHandleEBEE(iEvent.put(std::move(fixedBCs), ebeeClustersCollection_));
298  auto caloClusHandleES(iEvent.put(std::move(fixedESs), esClustersCollection_));
299 
300  //relink superclusters to output caloclusters
301  for (auto& sc : *fixedRefinedSCs) {
302  edm::Ptr<reco::CaloCluster> seedptr(caloClusHandleEBEE, pfClusterMapEBEE[sc.seed()]);
303  sc.setSeed(seedptr);
304 
306  for (auto&& cItr(sc.clustersBegin()); cItr!=sc.clustersEnd(); ++cItr)
307  clusters.push_back(reco::CaloClusterPtr(caloClusHandleEBEE, pfClusterMapEBEE[*cItr]));
308  sc.setClusters(clusters);
309 
310  reco::CaloClusterPtrVector psclusters;
311  for (auto&& cItr(sc.preshowerClustersBegin()); cItr!=sc.preshowerClustersEnd(); ++cItr)
312  psclusters.push_back(reco::CaloClusterPtr(caloClusHandleES, pfClusterMapES[*cItr]));
313  sc.setPreshowerClusters(psclusters);
314  }
315 
316  auto scHandle(iEvent.put(std::move(fixedRefinedSCs)));
317 
318  // Put the new to old refined SC map
319  std::auto_ptr<SCRefMap> pRefinedSCRefMap(new SCRefMap);
320  SCRefMap::Filler refinedSCMapFiller(*pRefinedSCRefMap);
321  refinedSCMapFiller.insert(scHandle, mappedRefinedSCs.begin(), mappedRefinedSCs.end());
322  refinedSCMapFiller.fill();
323  iEvent.put(pRefinedSCRefMap);
324 
325  // copy and relink conversions
326  for (auto& conv : *orgConvs) {
327  // copy Ctor is not defined for reco::Conversion but there is a clone() method
328  // that uses a copy Ctor. I suppose this object can be trivially copied..
329  fixedConvs->emplace_back(conv);
330  auto& newConv(fixedConvs->back());
331  // conversion keeps a PtrVector, but according to PFEGammaProducer, single-leg conversions
332  // always have only one SC ptr.
334  // we create the new refined SC collection in the same order as the old one
335  scPtrVec.push_back(reco::CaloClusterPtr(scHandle, conv.caloCluster()[0].key()));
336  newConv.setMatchingSuperCluster(scPtrVec);
337  }
338 
339  iEvent.put(std::move(fixedConvs));
340 }
341 
342 
343 std::vector<edm::Ptr<reco::CaloCluster> >
345  const reco::SuperCluster& rhs)
346 {
347  std::vector<edm::Ptr<reco::CaloCluster> > missingSubClusters;
348  for(auto& subClus : lhs.clusters()){
349  auto compFunc=[&subClus](const auto& rhs){return subClus->seed()==rhs->seed();};
350  if(std::find_if(rhs.clusters().begin(),rhs.clusters().end(),compFunc)==rhs.clusters().end()){
351  missingSubClusters.push_back(subClus);
352  }
353  }
354  return missingSubClusters;
355 }
356 
357 std::unordered_set<unsigned>
359  const reco::SuperCluster& orgSC,
360  const reco::SuperCluster& fixedSC,
361  const std::vector<edm::Ptr<reco::CaloCluster> >& clustersAddedToAnySC)
362 
363 {
364  auto const& clusAdded = getSubClustersMissing(orgRefinedSC,orgSC);
365  auto const& clusRemoved = getSubClustersMissing(orgSC,orgRefinedSC);
366 
367 
368  std::unordered_set<unsigned> detIdsOfClustersForNewSC;
369  for(auto& clus : fixedSC.clusters()){
370  auto compFunc=[&clus](auto& rhs){return rhs->seed().rawId()==clus->seed().rawId();};
371 
372  //first check if the cluster was removed by the refining process
373  bool notRemoved = std::find_if(clusRemoved.begin(),clusRemoved.end(),compFunc)==clusRemoved.end();
374 
375  //now check if it was assigned to another supercluster (it wont be picked up by the previous
376  //check if the parent supercluster picked it up during reclustering)
377  //if its a cluster which is added to any supercluster it wont add it
378  //its okay if it was added to this supercluster as we will add it in below
379  bool notAddedToASuperCluster = std::find_if(clustersAddedToAnySC.begin(),
380  clustersAddedToAnySC.end(),compFunc)==clustersAddedToAnySC.end();
381 
382  if(notRemoved && notAddedToASuperCluster){
383  detIdsOfClustersForNewSC.insert(clus->seed().rawId());
384  }
385  }
386  for(auto clus : clusAdded){
387  detIdsOfClustersForNewSC.insert(clus->seed().rawId());
388  }
389 
390  return detIdsOfClustersForNewSC;
391 }
392 
393 std::vector<edm::Ptr<reco::PFCluster> >
394 EGRefinedSCFixer::getClustersFromSeedIds(const std::unordered_set<unsigned>& seedIds,const edm::Handle<reco::PFClusterCollection >& inClusters)
395 {
396  std::vector<edm::Ptr<reco::PFCluster> > outClusters;
397  for(size_t clusNr=0;clusNr<inClusters->size();clusNr++){
398  edm::Ptr<reco::PFCluster> clusPtr(inClusters,clusNr);
399  if(seedIds.count(clusPtr->seed().rawId())>0){
400  outClusters.push_back(clusPtr);
401  }
402  }
403  std::sort(outClusters.begin(),outClusters.end(),[](auto& lhs,auto& rhs){return lhs->energy()>rhs->energy();});
404  return outClusters;
405 }
406 
407 //EB only which simplies things a lot
408 //stolen from PFEGammaAlgo which stole it from PFECALSuperClusterAlgo
409 //probably some sort of refactoring would be handy
412  const reco::SuperCluster& orgSC,
413  const reco::SuperCluster& fixedSC,
414  const edm::Handle<reco::PFClusterCollection >& fixedClusters,
415  const std::vector<edm::Ptr<reco::CaloCluster> >& clustersAddedToAnySC)
416 {
417  auto listOfSeedIds = getListOfClusterSeedIdsForNewSC(orgRefinedSC,orgSC,fixedSC,clustersAddedToAnySC);
418 
419  // make sure the seed cluster is in the listOfSeedIds
420  unsigned seedSeedId(fixedSC.seed()->seed().rawId());
421  listOfSeedIds.insert(seedSeedId);
422 
423  std::vector<edm::Ptr<reco::PFCluster> > clusters = getClustersFromSeedIds(listOfSeedIds,fixedClusters);
424 
425  // fixedSC.seed() is from a different BasicCluster collection
426  edm::Ptr<reco::PFCluster> seedCluster;
427  for (auto& ptr : clusters) {
428  if (ptr->seed().rawId() == seedSeedId) {
429  seedCluster = ptr;
430  break;
431  }
432  }
433 
434  std::vector<const reco::PFCluster*> clustersBarePtrs;
435 
436  double posX(0),posY(0),posZ(0);
437  double scNrgy(0),scCorrNrgy(0);
438  for(auto & clus : clusters){
439  clustersBarePtrs.push_back(&*clus);
440 
441  const double clusNrgy = clus->energy();
442  double clusCorrNrgy = clus->correctedEnergy();
443  const math::XYZPoint& clusPos = clus->position();
444  posX += clusNrgy * clusPos.X();
445  posY += clusNrgy * clusPos.Y();
446  posZ += clusNrgy * clusPos.Z();
447 
448  scNrgy += clusNrgy;
449  scCorrNrgy += clusCorrNrgy;
450 
451  }
452  posX /= scNrgy;
453  posY /= scNrgy;
454  posZ /= scNrgy;
455 
456  //intentionally passing in scCorrNrgy its not supposed to be scNrgy
457  reco::SuperCluster newSC(scCorrNrgy,math::XYZPoint(posX,posY,posZ));
458 
459  newSC.setCorrectedEnergy(scCorrNrgy);
460  newSC.setSeed(seedCluster); //the seed is the same as the non-refined SC
461  newSC.setPreshowerEnergyPlane1(0.);
462  newSC.setPreshowerEnergyPlane2(0.);
463  newSC.setPreshowerEnergy(0.);
464  for(const auto& clus : clusters ) {
465  newSC.addCluster(clus);
466  for(auto& hitAndFrac: clus->hitsAndFractions() ) {
467  newSC.addHitAndFraction(hitAndFrac.first,hitAndFrac.second);
468  }
469  }
470 
471  // calculate linearly weighted cluster widths
472  PFClusterWidthAlgo pfwidth(clustersBarePtrs);
473  newSC.setEtaWidth(pfwidth.pflowEtaWidth());
474  newSC.setPhiWidth(pfwidth.pflowPhiWidth());
475 
476  // cache the value of the raw energy
477  newSC.rawEnergy();
478 
479  return newSC;
480 }
481 
483 
484 #endif
const bool throwOnDupECALClustersInEvent_
T getParameter(std::string const &) const
virtual ~EGRefinedSCFixer()
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
const std::string esClustersCollection_
void addHitAndFraction(DetId id, float fraction)
Definition: CaloCluster.h:185
static std::unordered_set< unsigned > getListOfClusterSeedIdsForNewSC(const reco::SuperCluster &orgRefinedSC, const reco::SuperCluster &orgSC, const reco::SuperCluster &fixedSC, const std::vector< edm::Ptr< reco::CaloCluster > > &clustersAddedToAnySC)
static std::vector< edm::Ptr< reco::CaloCluster > > getSubClustersMissing(const reco::SuperCluster &lhs, const reco::SuperCluster &rhs)
static HepMC::IO_HEPEVT conv
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void setPreshowerEnergyPlane2(double preshowerEnergy2)
Definition: SuperCluster.h:61
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:141
const bool throwOnDupESClustersInEvent_
static std::vector< edm::Ptr< reco::PFCluster > > getClustersFromSeedIds(const std::unordered_set< unsigned > &seedIds, const edm::Handle< reco::PFClusterCollection > &inClusters)
double pflowPhiWidth() const
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:52
edm::EDGetTokenT< reco::PFClusterCollection > fixedPFClustersToken_
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:96
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:69
static reco::SuperClusterRef matchSCBySeedCrys(const reco::SuperCluster &, HANDLE const &)
void setPhiWidth(double pw)
Definition: SuperCluster.h:62
double pflowEtaWidth() const
const std::string ebeeClustersCollection_
const_iterator begin() const
Definition: PtrVector.h:130
reco::SuperCluster makeFixedRefinedSC(const reco::SuperCluster &orgRefinedSC, const reco::SuperCluster &orgSC, const reco::SuperCluster &fixedSC)
void setEtaWidth(double ew)
Definition: SuperCluster.h:63
edm::EDGetTokenT< reco::ConversionCollection > orgConvToken_
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::CaloClusterCollection > orgESToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
void setCorrectedEnergy(double cenergy)
Definition: CaloCluster.h:109
def move
Definition: eostools.py:510
tuple handle
Definition: patZpeak.py:22
const_iterator end() const
Definition: PtrVector.h:135
edm::EDGetTokenT< reco::SuperClusterCollection > fixedSCToken_[2]
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
static reco::SuperCluster makeFixedRefinedBarrelSC(const reco::SuperCluster &orgRefinedSC, const reco::SuperCluster &orgSC, const reco::SuperCluster &fixedSC, const edm::Handle< reco::PFClusterCollection > &fixedClusters, const std::vector< edm::Ptr< reco::CaloCluster > > &clustersAddedToAnySC)
edm::EDGetTokenT< reco::SuperClusterCollection > orgRefinedSCToken_
edm::EDGetTokenT< reco::SuperClusterCollection > orgSCToken_[2]
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:111
edm::ValueMap< reco::SuperClusterRef > SCRefMap
void getToken(edm::EDGetTokenT< T > &token, const edm::ParameterSet &pset, const std::string &label, const std::string &instance="")
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
edm::ValueMap< reco::ConversionRef > ConvRefMap
edm::EDGetTokenT< reco::CaloClusterCollection > orgBCToken_
EGRefinedSCFixer(const edm::ParameterSet &)
void setPreshowerEnergyPlane1(double preshowerEnergy1)
Definition: SuperCluster.h:60
virtual void produce(edm::Event &, const edm::EventSetup &)
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:59