CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ConvertedPhotonProducer Class Reference

#include <ConvertedPhotonProducer.h>

Inheritance diagram for ConvertedPhotonProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (edm::Run const &, const edm::EventSetup &es) final
 
 ConvertedPhotonProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &evt, const edm::EventSetup &es) override
 
 ~ConvertedPhotonProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void buildCollections (edm::EventSetup const &es, const edm::Handle< edm::View< reco::CaloCluster > > &scHandle, const edm::Handle< edm::View< reco::CaloCluster > > &bcHandle, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, const edm::Handle< reco::TrackCollection > &trkHandle, std::map< std::vector< reco::TransientTrack >, reco::CaloClusterPtr, CompareTwoTracksVectors > &allPairs, reco::ConversionCollection &outputConvPhotonCollection)
 
float calculateMinApproachDistance (const reco::TrackRef &track1, const reco::TrackRef &track2)
 
void cleanCollections (const edm::Handle< edm::View< reco::CaloCluster > > &scHandle, const edm::OrphanHandle< reco::ConversionCollection > &conversionHandle, reco::ConversionCollection &outputCollection)
 
void getCircleCenter (const reco::TrackRef &tk, double r, double &x0, double &y0)
 
std::vector< reco::ConversionRefsolveAmbiguity (const edm::OrphanHandle< reco::ConversionCollection > &conversionHandle, reco::CaloClusterPtr const &sc)
 
math::XYZPointF toFConverterP (const math::XYZPoint &val)
 
math::XYZVectorF toFConverterV (const math::XYZVector &val)
 

Private Attributes

std::string algoName_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordcaloGeomToken_
 
std::string CleanedConvertedPhotonCollection_
 
edm::ParameterSet conf_
 
edm::EDGetTokenT< reco::TrackCollectionconversionIOTrackProducer_
 
edm::EDGetTokenT< reco::TrackCollectionconversionOITrackProducer_
 
std::string ConvertedPhotonCollection_
 
double deltaCotCut_
 
double dRForConversionRecovery_
 
edm::EDGetTokenT< reco::TrackCollectiongeneralTrackProducer_
 
edm::EDGetTokenT< CaloTowerCollectionhcalTowers_
 
double hOverEConeSize_
 
edm::EDGetTokenT< reco::TrackCaloClusterPtrAssociationinOutTrackSCAssociationCollection_
 
std::string likelihoodWeights_
 
double maxHOverE_
 
int maxNumOfCandidates_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmFToken_
 
double minApproachDisCut_
 
double minSCEt_
 
int nEvt_
 
edm::EDGetTokenT< reco::TrackCaloClusterPtrAssociationoutInTrackSCAssociationCollection_
 
bool recoverOneTrackCase_
 
bool risolveAmbiguity_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scHybridBarrelProducer_
 
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 
ConversionTrackEcalImpactPointtheEcalImpactPositionFinder_
 
ConversionLikelihoodCalculatortheLikelihoodCalc_
 
edm::ESHandle< MagneticFieldtheMF_
 
ConversionTrackPairFindertheTrackPairFinder_
 
edm::ESHandle< TransientTrackBuildertheTransientTrackBuilder_
 
ConversionVertexFindertheVertexFinder_
 
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtransientTrackToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 38 of file ConvertedPhotonProducer.h.

Constructor & Destructor Documentation

◆ ConvertedPhotonProducer()

ConvertedPhotonProducer::ConvertedPhotonProducer ( const edm::ParameterSet ps)

Definition at line 44 of file ConvertedPhotonProducer.cc.

45  : conf_(config), theTrackPairFinder_(nullptr), theVertexFinder_(nullptr), theLikelihoodCalc_(nullptr) {
46  //cout<< " ConvertedPhotonProducer CTOR " << "\n";
47 
48  // use onfiguration file to setup input collection names
50  consumes<edm::View<reco::CaloCluster> >(conf_.getParameter<edm::InputTag>("bcBarrelCollection"));
52  consumes<edm::View<reco::CaloCluster> >(conf_.getParameter<edm::InputTag>("bcEndcapCollection"));
53 
55  consumes<edm::View<reco::CaloCluster> >(conf_.getParameter<edm::InputTag>("scHybridBarrelProducer"));
57  consumes<edm::View<reco::CaloCluster> >(conf_.getParameter<edm::InputTag>("scIslandEndcapProducer"));
58 
59  std::string oitrackprod = conf_.getParameter<std::string>("conversionOITrackProducer");
60  std::string iotrackprod = conf_.getParameter<std::string>("conversionIOTrackProducer");
61 
62  std::string oitrackassoc = conf_.getParameter<std::string>("outInTrackSCAssociation");
63  std::string iotrackassoc = conf_.getParameter<std::string>("inOutTrackSCAssociation");
64 
65  edm::InputTag oitracks(oitrackprod), oitracksassoc(oitrackprod, oitrackassoc), iotracks(iotrackprod),
66  iotracksassoc(iotrackprod, iotrackassoc);
67 
68  conversionOITrackProducer_ = consumes<reco::TrackCollection>(oitracks);
69  outInTrackSCAssociationCollection_ = consumes<reco::TrackCaloClusterPtrAssociation>(oitracksassoc);
70  conversionIOTrackProducer_ = consumes<reco::TrackCollection>(iotracks);
71  inOutTrackSCAssociationCollection_ = consumes<reco::TrackCaloClusterPtrAssociation>(iotracksassoc);
72 
73  generalTrackProducer_ = consumes<reco::TrackCollection>(conf_.getParameter<edm::InputTag>("generalTracksSrc"));
74 
75  algoName_ = conf_.getParameter<std::string>("AlgorithmName");
76 
77  hcalTowers_ = consumes<CaloTowerCollection>(conf_.getParameter<edm::InputTag>("hcalTowers"));
78  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
79  maxHOverE_ = conf_.getParameter<double>("maxHOverE");
80  minSCEt_ = conf_.getParameter<double>("minSCEt");
81  recoverOneTrackCase_ = conf_.getParameter<bool>("recoverOneTrackCase");
82  dRForConversionRecovery_ = conf_.getParameter<double>("dRForConversionRecovery");
83  deltaCotCut_ = conf_.getParameter<double>("deltaCotCut");
84  minApproachDisCut_ = conf_.getParameter<double>("minApproachDisCut");
85 
86  maxNumOfCandidates_ = conf_.getParameter<int>("maxNumOfCandidates");
87  risolveAmbiguity_ = conf_.getParameter<bool>("risolveConversionAmbiguity");
88  likelihoodWeights_ = conf_.getParameter<std::string>("MVA_weights_location");
89 
90  caloGeomToken_ = esConsumes();
91  mFToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord, edm::Transition::BeginRun>();
92  transientTrackToken_ = esConsumes<TransientTrackBuilder, TransientTrackRecord, edm::Transition::BeginRun>(
93  edm::ESInputTag("", "TransientTrackBuilder"));
94 
95  // use configuration file to setup output collection names
96  ConvertedPhotonCollection_ = conf_.getParameter<std::string>("convertedPhotonCollection");
97  CleanedConvertedPhotonCollection_ = conf_.getParameter<std::string>("cleanedConvertedPhotonCollection");
98 
99  // Register the product
100  produces<reco::ConversionCollection>(ConvertedPhotonCollection_);
101  produces<reco::ConversionCollection>(CleanedConvertedPhotonCollection_);
102 
103  // instantiate the Track Pair Finder algorithm
105  edm::FileInPath path_mvaWeightFile(likelihoodWeights_.c_str());
107  theLikelihoodCalc_->setWeightsFile(path_mvaWeightFile.fullPath().c_str());
108  // instantiate the Vertex Finder algorithm
110 
111  // Inizilize my global event counter
112  nEvt_ = 0;
113 }

References algoName_, bcBarrelCollection_, bcEndcapCollection_, caloGeomToken_, CleanedConvertedPhotonCollection_, conf_, conversionIOTrackProducer_, conversionOITrackProducer_, ConvertedPhotonCollection_, deltaCotCut_, dRForConversionRecovery_, generalTrackProducer_, edm::ParameterSet::getParameter(), hcalTowers_, hOverEConeSize_, inOutTrackSCAssociationCollection_, likelihoodWeights_, maxHOverE_, maxNumOfCandidates_, mFToken_, minApproachDisCut_, minSCEt_, nEvt_, outInTrackSCAssociationCollection_, recoverOneTrackCase_, risolveAmbiguity_, scHybridBarrelProducer_, scIslandEndcapProducer_, ConversionLikelihoodCalculator::setWeightsFile(), AlCaHLTBitMon_QueryRunRegistry::string, theLikelihoodCalc_, theTrackPairFinder_, theVertexFinder_, and transientTrackToken_.

◆ ~ConvertedPhotonProducer()

ConvertedPhotonProducer::~ConvertedPhotonProducer ( )
override

Definition at line 115 of file ConvertedPhotonProducer.cc.

115  {
116  delete theTrackPairFinder_;
117  delete theLikelihoodCalc_;
118  delete theVertexFinder_;
119 }

References theLikelihoodCalc_, theTrackPairFinder_, and theVertexFinder_.

Member Function Documentation

◆ beginRun()

void ConvertedPhotonProducer::beginRun ( edm::Run const &  r,
const edm::EventSetup es 
)
final

Definition at line 121 of file ConvertedPhotonProducer.cc.

121  {
122  //get magnetic field
123  //edm::LogInfo("ConvertedPhotonProducer") << " get magnetic field" << "\n";
124  theMF_ = theEventSetup.getHandle(mFToken_);
125 
126  // Transform Track into TransientTrack (needed by the Vertex fitter)
127  theTransientTrackBuilder_ = theEventSetup.getHandle(transientTrackToken_);
128 }

References edm::EventSetup::getHandle(), mFToken_, theMF_, theTransientTrackBuilder_, and transientTrackToken_.

◆ buildCollections()

void ConvertedPhotonProducer::buildCollections ( edm::EventSetup const &  es,
const edm::Handle< edm::View< reco::CaloCluster > > &  scHandle,
const edm::Handle< edm::View< reco::CaloCluster > > &  bcHandle,
const edm::Handle< CaloTowerCollection > &  hcalTowersHandle,
const edm::Handle< reco::TrackCollection > &  trkHandle,
std::map< std::vector< reco::TransientTrack >, reco::CaloClusterPtr, CompareTwoTracksVectors > &  allPairs,
reco::ConversionCollection outputConvPhotonCollection 
)
private

Definition at line 282 of file ConvertedPhotonProducer.cc.

291 {
292  // instantiate the algorithm for finding the position of the track extrapolation at the Ecal front face
293  ConversionTrackEcalImpactPoint theEcalImpactPositionFinder(&(*theMF_));
294 
296 
297  std::vector<reco::TransientTrack> t_generalTrk;
299  t_generalTrk = (*theTransientTrackBuilder_).build(generalTrkHandle);
300  //const CaloGeometry* geometry = theCaloGeom_.product();
301 
302  // Loop over SC in the barrel and reconstruct converted photons
303  int myCands = 0;
305  for (auto const& aClus : scHandle->ptrs()) {
306  // preselection based in Et and H/E cut
307  if (aClus->energy() / cosh(aClus->eta()) <= minSCEt_)
308  continue;
309  const reco::CaloCluster* pClus = &(*aClus);
310  const reco::SuperCluster* sc = dynamic_cast<const reco::SuperCluster*>(pClus);
311  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
312  EgammaTowerIsolation towerIso(hOverEConeSize_, 0., 0., -1, hcalTowersColl);
313  double HoE = towerIso.getTowerESum(sc) / sc->energy();
314  if (HoE >= maxHOverE_)
315  continue;
317 
318  std::vector<edm::Ref<reco::TrackCollection> > trackPairRef;
319  std::vector<math::XYZPointF> trackInnPos;
320  std::vector<math::XYZVectorF> trackPin;
321  std::vector<math::XYZVectorF> trackPout;
322  float minAppDist = -99;
323 
324  //LogDebug("ConvertedPhotonProducer") << "ConvertedPhotonProducer SC energy " << aClus->energy() << " eta " << aClus->eta() << " phi " << aClus->phi() << "\n";
325 
327  const reco::Particle::Point vtx(0, 0, 0);
328 
329  math::XYZVector direction = aClus->position() - vtx;
330  math::XYZVector momentum = direction.unit() * aClus->energy();
331  const reco::Particle::LorentzVector p4(momentum.x(), momentum.y(), momentum.z(), aClus->energy());
332 
333  int nFound = 0;
334  if (!allPairs.empty()) {
335  nFound = 0;
336 
337  for (std::map<std::vector<reco::TransientTrack>, reco::CaloClusterPtr>::const_iterator iPair = allPairs.begin();
338  iPair != allPairs.end();
339  ++iPair) {
340  scPtrVec.clear();
341 
342  reco::Vertex theConversionVertex;
343  reco::CaloClusterPtr caloPtr = iPair->second;
344  if (!(aClus == caloPtr))
345  continue;
346 
347  scPtrVec.push_back(aClus);
348  nFound++;
349 
350  std::vector<math::XYZPointF> trkPositionAtEcal = theEcalImpactPositionFinder.find(iPair->first, bcHandle);
351  std::vector<reco::CaloClusterPtr> matchingBC = theEcalImpactPositionFinder.matchingBC();
352 
353  minAppDist = -99;
354  const std::string metname = "ConvertedPhotons|ConvertedPhotonProducer";
355  if ((iPair->first).size() > 1) {
356  try {
357  theVertexFinder_->run(iPair->first, theConversionVertex);
358 
359  } catch (cms::Exception& e) {
360  //std::cout << " cms::Exception caught in ConvertedPhotonProducer::produce" << "\n" ;
361  edm::LogWarning(metname) << "cms::Exception caught in ConvertedPhotonProducer::produce\n"
362  << e.explainSelf();
363  }
364 
365  // Old TwoTrackMinimumDistance md;
366  // Old md.calculate ( (iPair->first)[0].initialFreeState(), (iPair->first)[1].initialFreeState() );
367  // Old minAppDist = md.distance();
368 
369  /*
370  for ( unsigned int i=0; i< matchingBC.size(); ++i) {
371  if ( matchingBC[i].isNull() ) std::cout << " This ref to BC is null: skipping " << "\n";
372  else
373  std::cout << " BC energy " << matchingBC[i]->energy() << "\n";
374  }
375  */
376 
378  trackPairRef.clear();
379  trackInnPos.clear();
380  trackPin.clear();
381  trackPout.clear();
382 
383  for (std::vector<reco::TransientTrack>::const_iterator iTk = (iPair->first).begin();
384  iTk != (iPair->first).end();
385  ++iTk) {
386  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer Transient Tracks in the pair charge " << iTk->charge() << " Num of RecHits " << iTk->recHitsSize() << " inner momentum " << iTk->track().innerMomentum() << "\n";
387 
388  const reco::TrackTransientTrack* ttt =
389  dynamic_cast<const reco::TrackTransientTrack*>(iTk->basicTransientTrack());
390  reco::TrackRef myTkRef = ttt->persistentTrackRef();
391 
392  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer Ref to Rec Tracks in the pair charge " << myTkRef->charge() << " Num of RecHits " << myTkRef->recHitsSize() << " inner momentum " << myTkRef->innerMomentum() << "\n";
393  if (myTkRef->extra().isNonnull()) {
394  trackInnPos.push_back(toFConverterP(myTkRef->innerPosition()));
395  trackPin.push_back(toFConverterV(myTkRef->innerMomentum()));
396  trackPout.push_back(toFConverterV(myTkRef->outerMomentum()));
397  }
398  trackPairRef.push_back(myTkRef);
399  }
400 
401  // std::cout << " ConvertedPhotonProducer trackPin size " << trackPin.size() << std::endl;
402  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer SC energy " << aClus->energy() << "\n";
403  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer photon p4 " << p4 << "\n";
404  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer vtx " << vtx.x() << " " << vtx.y() << " " << vtx.z() << "\n";
405  if (theConversionVertex.isValid()) {
406  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer theConversionVertex " << theConversionVertex.position().x() << " " << theConversionVertex.position().y() << " " << theConversionVertex.position().z() << "\n";
407  }
408  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer trackPairRef " << trackPairRef.size() << "\n";
409 
410  minAppDist = calculateMinApproachDistance(trackPairRef[0], trackPairRef[1]);
411 
412  double like = -999.;
413  reco::Conversion newCandidate(scPtrVec,
414  trackPairRef,
415  trkPositionAtEcal,
416  theConversionVertex,
417  matchingBC,
418  minAppDist,
419  trackInnPos,
420  trackPin,
421  trackPout,
422  like,
423  algo);
424  // like = theLikelihoodCalc_->calculateLikelihood(newCandidate, es );
425  like = theLikelihoodCalc_->calculateLikelihood(newCandidate);
426  // std::cout << "like = " << like << std::endl;
427  newCandidate.setMVAout(like);
428  outputConvPhotonCollection.push_back(newCandidate);
429 
430  myCands++;
431  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer Put the ConvertedPhotonCollection a candidate in the Barrel " << "\n";
432 
433  } else {
434  // std::cout << " ConvertedPhotonProducer case with only one track found " << "\n";
435 
436  //std::cout << " ConvertedPhotonProducer recovering one track " << "\n";
437  trackPairRef.clear();
438  trackInnPos.clear();
439  trackPin.clear();
440  trackPout.clear();
441  std::vector<reco::TransientTrack>::const_iterator iTk = (iPair->first).begin();
442  //std::cout << " ConvertedPhotonProducer Transient Tracks in the pair charge " << iTk->charge() << " Num of RecHits " << iTk->recHitsSize() << " inner momentum " << iTk->track().innerMomentum() << " pt " << sqrt(iTk->track().innerMomentum().perp2()) << "\n";
443  const reco::TrackTransientTrack* ttt =
444  dynamic_cast<const reco::TrackTransientTrack*>(iTk->basicTransientTrack());
445  reco::TrackRef myTk = ttt->persistentTrackRef();
446  if (myTk->extra().isNonnull()) {
447  trackInnPos.push_back(toFConverterP(myTk->innerPosition()));
448  trackPin.push_back(toFConverterV(myTk->innerMomentum()));
449  trackPout.push_back(toFConverterV(myTk->outerMomentum()));
450  }
451  trackPairRef.push_back(myTk);
452  //std::cout << " Provenance " << myTk->algoName() << std::endl;
453 
454  if (recoverOneTrackCase_) {
455  float theta1 = myTk->innerMomentum().Theta();
456  float dCot = 999.;
457  float dCotTheta = -999.;
458  reco::TrackRef goodRef;
459  std::vector<reco::TransientTrack>::const_iterator iGoodGenTran;
460  for (std::vector<reco::TransientTrack>::const_iterator iTran = t_generalTrk.begin();
461  iTran != t_generalTrk.end();
462  ++iTran) {
463  const reco::TrackTransientTrack* ttt =
464  dynamic_cast<const reco::TrackTransientTrack*>(iTran->basicTransientTrack());
465  reco::TrackRef trRef = ttt->persistentTrackRef();
466  if (trRef->charge() * myTk->charge() > 0)
467  continue;
468  float dEta = trRef->eta() - myTk->eta();
469  float dPhi = trRef->phi() - myTk->phi();
471  continue;
472  float theta2 = trRef->innerMomentum().Theta();
473  dCotTheta = 1. / tan(theta1) - 1. / tan(theta2);
474  // std::cout << " ConvertedPhotonProducer recovering general transient track charge " << trRef->charge() << " momentum " << trRef->innerMomentum() << " dcotTheta " << fabs(dCotTheta) << std::endl;
475  if (fabs(dCotTheta) < dCot) {
476  dCot = fabs(dCotTheta);
477  goodRef = trRef;
478  iGoodGenTran = iTran;
479  }
480  }
481 
482  if (goodRef.isNonnull()) {
483  minAppDist = calculateMinApproachDistance(myTk, goodRef);
484 
485  // std::cout << " ConvertedPhotonProducer chosen dCotTheta " << fabs(dCotTheta) << std::endl;
486  if (fabs(dCotTheta) < deltaCotCut_ && minAppDist > minApproachDisCut_) {
487  trackInnPos.push_back(toFConverterP(goodRef->innerPosition()));
488  trackPin.push_back(toFConverterV(goodRef->innerMomentum()));
489  trackPout.push_back(toFConverterV(goodRef->outerMomentum()));
490  trackPairRef.push_back(goodRef);
491  // std::cout << " ConvertedPhotonProducer adding opposite charge track from generalTrackCollection charge " << goodRef ->charge() << " pt " << sqrt(goodRef->innerMomentum().perp2()) << " trackPairRef size " << trackPairRef.size() << std::endl;
492  //std::cout << " Track Provenenance " << goodRef->algoName() << std::endl;
493  std::vector<reco::TransientTrack> mypair;
494  mypair.push_back(*iTk);
495  mypair.push_back(*iGoodGenTran);
496 
497  try {
498  theVertexFinder_->run(iPair->first, theConversionVertex);
499 
500  } catch (cms::Exception& e) {
501  //std::cout << " cms::Exception caught in ConvertedPhotonProducer::produce" << "\n" ;
502  edm::LogWarning(metname) << "cms::Exception caught in ConvertedPhotonProducer::produce\n"
503  << e.explainSelf();
504  }
505  }
506  }
507 
508  } // bool On/Off one track case recovery using generalTracks
509  double like = -999.;
510  reco::Conversion newCandidate(scPtrVec,
511  trackPairRef,
512  trkPositionAtEcal,
513  theConversionVertex,
514  matchingBC,
515  minAppDist,
516  trackInnPos,
517  trackPin,
518  trackPout,
519  like,
520  algo);
521  like = theLikelihoodCalc_->calculateLikelihood(newCandidate);
522  newCandidate.setMVAout(like);
523  outputConvPhotonCollection.push_back(newCandidate);
524 
525  } // case with only on track: looking in general tracks
526  }
527  }
528  }
529 }

References reco::Conversion::algoByName(), algoName_, ConversionLikelihoodCalculator::calculateLikelihood(), calculateMinApproachDistance(), edm::PtrVectorBase::clear(), deltaCotCut_, HLT_FULL_cff::dEta, HLT_FULL_cff::dPhi, dRForConversionRecovery_, MillePedeFileConverter_cfg::e, mps_fire::end, reco::CaloCluster::energy(), ConversionTrackEcalImpactPoint::find(), EgammaTowerIsolation::getTowerESum(), hOverEConeSize_, edm::Ref< C, T, F >::isNonnull(), reco::Vertex::isValid(), genParticles_cff::map, ConversionTrackEcalImpactPoint::matchingBC(), maxHOverE_, metname, minApproachDisCut_, minSCEt_, p4, reco::TrackTransientTrack::persistentTrackRef(), edm::Handle< T >::product(), edm::PtrVector< T >::push_back(), recoverOneTrackCase_, ConversionVertexFinder::run(), reco::Conversion::setMVAout(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), theLikelihoodCalc_, theMF_, theVertexFinder_, toFConverterP(), toFConverterV(), and extraflags_cff::vtx.

Referenced by produce().

◆ calculateMinApproachDistance()

float ConvertedPhotonProducer::calculateMinApproachDistance ( const reco::TrackRef track1,
const reco::TrackRef track2 
)
private

Definition at line 604 of file ConvertedPhotonProducer.cc.

605  {
606  float dist = 9999.;
607 
608  double x1, x2, y1, y2;
609  double xx_1 = track1->innerPosition().x(), yy_1 = track1->innerPosition().y(), zz_1 = track1->innerPosition().z();
610  double xx_2 = track2->innerPosition().x(), yy_2 = track2->innerPosition().y(), zz_2 = track2->innerPosition().z();
611  double radius1 = track1->innerMomentum().Rho() / (.3 * (theMF_->inTesla(GlobalPoint(xx_1, yy_1, zz_1)).z())) * 100;
612  double radius2 = track2->innerMomentum().Rho() / (.3 * (theMF_->inTesla(GlobalPoint(xx_2, yy_2, zz_2)).z())) * 100;
613  getCircleCenter(track1, radius1, x1, y1);
614  getCircleCenter(track2, radius2, x2, y2);
615  dist = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) - radius1 - radius2;
616 
617  return dist;
618 }

References getCircleCenter(), MagneticField::inTesla(), mathSSE::sqrt(), theMF_, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, testProducerWithPsetDescEmpty_cfi::y2, and PV3DBase< T, PVType, FrameType >::z().

Referenced by buildCollections().

◆ cleanCollections()

void ConvertedPhotonProducer::cleanCollections ( const edm::Handle< edm::View< reco::CaloCluster > > &  scHandle,
const edm::OrphanHandle< reco::ConversionCollection > &  conversionHandle,
reco::ConversionCollection outputCollection 
)
private

Definition at line 531 of file ConvertedPhotonProducer.cc.

533  {
534  reco::Conversion* newCandidate = nullptr;
535  for (auto const& aClus : scHandle->ptrs()) {
536  // SC energy preselection
537  if (aClus->energy() / cosh(aClus->eta()) <= minSCEt_)
538  continue;
539 
540  if (conversionHandle.isValid()) {
541  if (risolveAmbiguity_) {
542  std::vector<reco::ConversionRef> bestRef = solveAmbiguity(conversionHandle, aClus);
543 
544  for (std::vector<reco::ConversionRef>::iterator iRef = bestRef.begin(); iRef != bestRef.end(); iRef++) {
545  if (iRef->isNonnull()) {
546  newCandidate = (*iRef)->clone();
547  outputConversionCollection.push_back(*newCandidate);
548  delete newCandidate;
549  }
550  }
551 
552  } else {
553  for (unsigned int icp = 0; icp < conversionHandle->size(); icp++) {
555  if (!(aClus.id() == cpRef->caloCluster()[0].id() && aClus.key() == cpRef->caloCluster()[0].key()))
556  continue;
557  if (!cpRef->isConverted())
558  continue;
559  if (cpRef->nTracks() < 2)
560  continue;
561  newCandidate = (&(*cpRef))->clone();
562  outputConversionCollection.push_back(*newCandidate);
563  delete newCandidate;
564  }
565 
566  } // solve or not the ambiguity of many conversion candidates
567  }
568  }
569 }

References reco::Conversion::clone(), clone(), printConversionInfo::conversionHandle, edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::key(), minSCEt_, risolveAmbiguity_, and solveAmbiguity().

Referenced by produce().

◆ getCircleCenter()

void ConvertedPhotonProducer::getCircleCenter ( const reco::TrackRef tk,
double  r,
double &  x0,
double &  y0 
)
private

Definition at line 620 of file ConvertedPhotonProducer.cc.

620  {
621  double x1, y1, phi;
622  x1 = tk->innerPosition().x(); //inner position and inner momentum need track Extra!
623  y1 = tk->innerPosition().y();
624  phi = tk->innerMomentum().phi();
625  const int charge = tk->charge();
626  x0 = x1 + r * sin(phi) * charge;
627  y0 = y1 - r * cos(phi) * charge;
628 }

References ALCARECOTkAlJpsiMuMu_cff::charge, funct::cos(), phi, alignCSCRings::r, funct::sin(), testProducerWithPsetDescEmpty_cfi::x1, and testProducerWithPsetDescEmpty_cfi::y1.

Referenced by calculateMinApproachDistance().

◆ produce()

void ConvertedPhotonProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 130 of file ConvertedPhotonProducer.cc.

130  {
131  using namespace edm;
132  nEvt_++;
133 
134  // LogDebug("ConvertedPhotonProducer") << "ConvertedPhotonProduce::produce event number " << theEvent.id() << " Global counter " << nEvt_ << "\n";
135  // std::cout << "ConvertedPhotonProduce::produce event number " << theEvent.id() << " Global counter " << nEvt_ << "\n";
136 
137  //
138  // create empty output collections
139  //
140  // Converted photon candidates
141  reco::ConversionCollection outputConvPhotonCollection;
142  auto outputConvPhotonCollection_p = std::make_unique<reco::ConversionCollection>();
143  // Converted photon candidates
144  reco::ConversionCollection cleanedConversionCollection;
145  auto cleanedConversionCollection_p = std::make_unique<reco::ConversionCollection>();
146 
147  // Get the Super Cluster collection in the Barrel
148  bool validBarrelSCHandle = true;
150  theEvent.getByToken(scHybridBarrelProducer_, scBarrelHandle);
151  if (!scBarrelHandle.isValid()) {
152  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the scHybridBarrelProducer";
153  validBarrelSCHandle = false;
154  }
155 
156  // Get the Super Cluster collection in the Endcap
157  bool validEndcapSCHandle = true;
159  theEvent.getByToken(scIslandEndcapProducer_, scEndcapHandle);
160  if (!scEndcapHandle.isValid()) {
161  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the scIslandEndcapProducer";
162  validEndcapSCHandle = false;
163  }
164 
166  bool validTrackInputs = true;
167  Handle<reco::TrackCollection> outInTrkHandle;
168  theEvent.getByToken(conversionOITrackProducer_, outInTrkHandle);
169  if (!outInTrkHandle.isValid()) {
170  //std::cout << "Error! Can't get the conversionOITrack " << "\n";
171  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the conversionOITrack "
172  << "\n";
173  validTrackInputs = false;
174  }
175  // LogDebug("ConvertedPhotonProducer")<< "ConvertedPhotonProducer outInTrack collection size " << (*outInTrkHandle).size() << "\n";
176 
178  Handle<reco::TrackCaloClusterPtrAssociation> outInTrkSCAssocHandle;
179  theEvent.getByToken(outInTrackSCAssociationCollection_, outInTrkSCAssocHandle);
180  if (!outInTrkSCAssocHandle.isValid()) {
181  // std::cout << "Error! Can't get the product " << outInTrackSCAssociationCollection_.c_str() <<"\n";
182  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the outInTrackSCAssociationCollection)";
183  validTrackInputs = false;
184  }
185 
187  Handle<reco::TrackCollection> inOutTrkHandle;
188  theEvent.getByToken(conversionIOTrackProducer_, inOutTrkHandle);
189  if (!inOutTrkHandle.isValid()) {
190  // std::cout << "Error! Can't get the conversionIOTrack " << "\n";
191  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the conversionIOTrack "
192  << "\n";
193  validTrackInputs = false;
194  }
195  // LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer inOutTrack collection size " << (*inOutTrkHandle).size() << "\n";
196 
198 
199  Handle<reco::TrackCollection> generalTrkHandle;
200  if (recoverOneTrackCase_) {
201  theEvent.getByToken(generalTrackProducer_, generalTrkHandle);
202  if (!generalTrkHandle.isValid()) {
203  //std::cout << "Error! Can't get the genralTracks " << "\n";
204  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the genralTracks "
205  << "\n";
206  }
207  }
208 
210  Handle<reco::TrackCaloClusterPtrAssociation> inOutTrkSCAssocHandle;
211  theEvent.getByToken(inOutTrackSCAssociationCollection_, inOutTrkSCAssocHandle);
212  if (!inOutTrkSCAssocHandle.isValid()) {
213  //std::cout << "Error! Can't get the product " << inOutTrackSCAssociationCollection_.c_str() <<"\n";
214  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the inOutTrackSCAssociationCollection_.c_str()";
215  validTrackInputs = false;
216  }
217 
218  // Get the basic cluster collection in the Barrel
220  theEvent.getByToken(bcBarrelCollection_, bcBarrelHandle);
221  if (!bcBarrelHandle.isValid()) {
222  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the bcBarrelCollection";
223  }
224 
225  // Get the basic cluster collection in the Endcap
227  theEvent.getByToken(bcEndcapCollection_, bcEndcapHandle);
228  if (!bcEndcapHandle.isValid()) {
229  edm::LogError("ConvertedPhotonProducer") << "Error! Can't get the bcEndcapCollection";
230  }
231 
232  // get Hcal towers collection
233  Handle<CaloTowerCollection> hcalTowersHandle;
234  theEvent.getByToken(hcalTowers_, hcalTowersHandle);
235 
236  // get the geometry from the event setup:
237  theCaloGeom_ = theEventSetup.getHandle(caloGeomToken_);
238 
239  if (validTrackInputs) {
240  //do the conversion:
241  std::vector<reco::TransientTrack> t_outInTrk = (*theTransientTrackBuilder_).build(outInTrkHandle);
242  std::vector<reco::TransientTrack> t_inOutTrk = (*theTransientTrackBuilder_).build(inOutTrkHandle);
243 
245  std::map<std::vector<reco::TransientTrack>, reco::CaloClusterPtr, CompareTwoTracksVectors> allPairs;
246  allPairs = theTrackPairFinder_->run(
247  t_outInTrk, outInTrkHandle, outInTrkSCAssocHandle, t_inOutTrk, inOutTrkHandle, inOutTrkSCAssocHandle);
248  //LogDebug("ConvertedPhotonProducer") << "ConvertedPhotonProducer allPairs.size " << allPairs.size() << "\n";
249 
250  buildCollections(theEventSetup,
251  scBarrelHandle,
252  bcBarrelHandle,
253  hcalTowersHandle,
254  generalTrkHandle,
255  allPairs,
256  outputConvPhotonCollection);
257  buildCollections(theEventSetup,
258  scEndcapHandle,
259  bcEndcapHandle,
260  hcalTowersHandle,
261  generalTrkHandle,
262  allPairs,
263  outputConvPhotonCollection);
264  }
265 
266  // put the product in the event
267  outputConvPhotonCollection_p->assign(outputConvPhotonCollection.begin(), outputConvPhotonCollection.end());
268  //LogDebug("ConvertedPhotonProducer") << " ConvertedPhotonProducer Putting in the event converted photon candidates " << (*outputConvPhotonCollection_p).size() << "\n";
270  theEvent.put(std::move(outputConvPhotonCollection_p), ConvertedPhotonCollection_);
271 
272  // Loop over barrel and endcap SC collections and fill the photon collection
273  if (validBarrelSCHandle)
274  cleanCollections(scBarrelHandle, conversionHandle, cleanedConversionCollection);
275  if (validEndcapSCHandle)
276  cleanCollections(scEndcapHandle, conversionHandle, cleanedConversionCollection);
277 
278  cleanedConversionCollection_p->assign(cleanedConversionCollection.begin(), cleanedConversionCollection.end());
279  theEvent.put(std::move(cleanedConversionCollection_p), CleanedConvertedPhotonCollection_);
280 }

References bcBarrelCollection_, bcEndcapCollection_, buildCollections(), caloGeomToken_, cleanCollections(), CleanedConvertedPhotonCollection_, printConversionInfo::conversionHandle, conversionIOTrackProducer_, conversionOITrackProducer_, ConvertedPhotonCollection_, generalTrackProducer_, edm::Event::getByToken(), edm::EventSetup::getHandle(), hcalTowers_, inOutTrackSCAssociationCollection_, edm::HandleBase::isValid(), eostools::move(), nEvt_, outInTrackSCAssociationCollection_, edm::Event::put(), recoverOneTrackCase_, ConversionTrackPairFinder::run(), scHybridBarrelProducer_, scIslandEndcapProducer_, theCaloGeom_, and theTrackPairFinder_.

◆ solveAmbiguity()

std::vector< reco::ConversionRef > ConvertedPhotonProducer::solveAmbiguity ( const edm::OrphanHandle< reco::ConversionCollection > &  conversionHandle,
reco::CaloClusterPtr const &  sc 
)
private

Definition at line 571 of file ConvertedPhotonProducer.cc.

572  {
573  std::multimap<double, reco::ConversionRef, std::greater<double> > convMap;
574 
575  for (unsigned int icp = 0; icp < conversionHandle->size(); icp++) {
577 
578  //std::cout << " cpRef " << cpRef->nTracks() << " " << cpRef ->caloCluster()[0]->energy() << std::endl;
579  if (!(scRef.id() == cpRef->caloCluster()[0].id() && scRef.key() == cpRef->caloCluster()[0].key()))
580  continue;
581  if (!cpRef->isConverted())
582  continue;
583  double like = cpRef->MVAout();
584  if (cpRef->nTracks() < 2)
585  continue;
586  // std::cout << " Like " << like << std::endl;
587  convMap.insert(std::make_pair(like, cpRef));
588  }
589 
590  // std::cout << " convMap size " << convMap.size() << std::endl;
591 
592  std::multimap<double, reco::ConversionRef>::iterator iMap;
593  std::vector<reco::ConversionRef> bestRefs;
594  for (iMap = convMap.begin(); iMap != convMap.end(); iMap++) {
595  // std::cout << " Like list in the map " << iMap->first << " " << (iMap->second)->EoverP() << std::endl;
596  bestRefs.push_back(iMap->second);
597  if (int(bestRefs.size()) == maxNumOfCandidates_)
598  break;
599  }
600 
601  return bestRefs;
602 }

References printConversionInfo::conversionHandle, edm::Ptr< T >::id(), edm::Ref< C, T, F >::id(), edm::Ptr< T >::key(), edm::Ref< C, T, F >::key(), and maxNumOfCandidates_.

Referenced by cleanCollections().

◆ toFConverterP()

math::XYZPointF ConvertedPhotonProducer::toFConverterP ( const math::XYZPoint val)
inlineprivate

Definition at line 110 of file ConvertedPhotonProducer.h.

110 { return math::XYZPointF(val.x(), val.y(), val.z()); }

References heppy_batch::val.

Referenced by buildCollections().

◆ toFConverterV()

math::XYZVectorF ConvertedPhotonProducer::toFConverterV ( const math::XYZVector val)
inlineprivate

Definition at line 112 of file ConvertedPhotonProducer.h.

112 { return math::XYZVectorF(val.x(), val.y(), val.z()); }

References heppy_batch::val.

Referenced by buildCollections().

Member Data Documentation

◆ algoName_

std::string ConvertedPhotonProducer::algoName_
private

Definition at line 95 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), and ConvertedPhotonProducer().

◆ bcBarrelCollection_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConvertedPhotonProducer::bcBarrelCollection_
private

Definition at line 76 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ bcEndcapCollection_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConvertedPhotonProducer::bcEndcapCollection_
private

Definition at line 77 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ caloGeomToken_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> ConvertedPhotonProducer::caloGeomToken_
private

Definition at line 87 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ CleanedConvertedPhotonCollection_

std::string ConvertedPhotonProducer::CleanedConvertedPhotonCollection_
private

Definition at line 74 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ conf_

edm::ParameterSet ConvertedPhotonProducer::conf_
private

Definition at line 80 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer().

◆ conversionIOTrackProducer_

edm::EDGetTokenT<reco::TrackCollection> ConvertedPhotonProducer::conversionIOTrackProducer_
private

Definition at line 66 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ conversionOITrackProducer_

edm::EDGetTokenT<reco::TrackCollection> ConvertedPhotonProducer::conversionOITrackProducer_
private

Definition at line 65 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ ConvertedPhotonCollection_

std::string ConvertedPhotonProducer::ConvertedPhotonCollection_
private

Definition at line 73 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ deltaCotCut_

double ConvertedPhotonProducer::deltaCotCut_
private

Definition at line 102 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), and ConvertedPhotonProducer().

◆ dRForConversionRecovery_

double ConvertedPhotonProducer::dRForConversionRecovery_
private

Definition at line 101 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), and ConvertedPhotonProducer().

◆ generalTrackProducer_

edm::EDGetTokenT<reco::TrackCollection> ConvertedPhotonProducer::generalTrackProducer_
private

Definition at line 71 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ hcalTowers_

edm::EDGetTokenT<CaloTowerCollection> ConvertedPhotonProducer::hcalTowers_
private

Definition at line 81 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ hOverEConeSize_

double ConvertedPhotonProducer::hOverEConeSize_
private

Definition at line 97 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), and ConvertedPhotonProducer().

◆ inOutTrackSCAssociationCollection_

edm::EDGetTokenT<reco::TrackCaloClusterPtrAssociation> ConvertedPhotonProducer::inOutTrackSCAssociationCollection_
private

Definition at line 69 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ likelihoodWeights_

std::string ConvertedPhotonProducer::likelihoodWeights_
private

Definition at line 108 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer().

◆ maxHOverE_

double ConvertedPhotonProducer::maxHOverE_
private

Definition at line 98 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), and ConvertedPhotonProducer().

◆ maxNumOfCandidates_

int ConvertedPhotonProducer::maxNumOfCandidates_
private

Definition at line 104 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and solveAmbiguity().

◆ mFToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> ConvertedPhotonProducer::mFToken_
private

Definition at line 88 of file ConvertedPhotonProducer.h.

Referenced by beginRun(), and ConvertedPhotonProducer().

◆ minApproachDisCut_

double ConvertedPhotonProducer::minApproachDisCut_
private

Definition at line 103 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), and ConvertedPhotonProducer().

◆ minSCEt_

double ConvertedPhotonProducer::minSCEt_
private

◆ nEvt_

int ConvertedPhotonProducer::nEvt_
private

Definition at line 94 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ outInTrackSCAssociationCollection_

edm::EDGetTokenT<reco::TrackCaloClusterPtrAssociation> ConvertedPhotonProducer::outInTrackSCAssociationCollection_
private

Definition at line 68 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ recoverOneTrackCase_

bool ConvertedPhotonProducer::recoverOneTrackCase_
private

Definition at line 100 of file ConvertedPhotonProducer.h.

Referenced by buildCollections(), ConvertedPhotonProducer(), and produce().

◆ risolveAmbiguity_

bool ConvertedPhotonProducer::risolveAmbiguity_
private

Definition at line 105 of file ConvertedPhotonProducer.h.

Referenced by cleanCollections(), and ConvertedPhotonProducer().

◆ scHybridBarrelProducer_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConvertedPhotonProducer::scHybridBarrelProducer_
private

Definition at line 78 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ scIslandEndcapProducer_

edm::EDGetTokenT<edm::View<reco::CaloCluster> > ConvertedPhotonProducer::scIslandEndcapProducer_
private

Definition at line 79 of file ConvertedPhotonProducer.h.

Referenced by ConvertedPhotonProducer(), and produce().

◆ theCaloGeom_

edm::ESHandle<CaloGeometry> ConvertedPhotonProducer::theCaloGeom_
private

Definition at line 83 of file ConvertedPhotonProducer.h.

Referenced by produce().

◆ theEcalImpactPositionFinder_

ConversionTrackEcalImpactPoint* ConvertedPhotonProducer::theEcalImpactPositionFinder_
private

Definition at line 93 of file ConvertedPhotonProducer.h.

◆ theLikelihoodCalc_

ConversionLikelihoodCalculator* ConvertedPhotonProducer::theLikelihoodCalc_
private

◆ theMF_

edm::ESHandle<MagneticField> ConvertedPhotonProducer::theMF_
private

◆ theTrackPairFinder_

ConversionTrackPairFinder* ConvertedPhotonProducer::theTrackPairFinder_
private

◆ theTransientTrackBuilder_

edm::ESHandle<TransientTrackBuilder> ConvertedPhotonProducer::theTransientTrackBuilder_
private

Definition at line 85 of file ConvertedPhotonProducer.h.

Referenced by beginRun().

◆ theVertexFinder_

ConversionVertexFinder* ConvertedPhotonProducer::theVertexFinder_
private

◆ transientTrackToken_

edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> ConvertedPhotonProducer::transientTrackToken_
private

Definition at line 89 of file ConvertedPhotonProducer.h.

Referenced by beginRun(), and ConvertedPhotonProducer().

reco::Vertex::isValid
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:72
reco::Conversion
Definition: Conversion.h:23
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
edm::ESInputTag
Definition: ESInputTag.h:87
ConvertedPhotonProducer::scIslandEndcapProducer_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
Definition: ConvertedPhotonProducer.h:79
ConversionLikelihoodCalculator
Definition: ConversionLikelihoodCalculator.h:9
ConvertedPhotonProducer::theLikelihoodCalc_
ConversionLikelihoodCalculator * theLikelihoodCalc_
Definition: ConvertedPhotonProducer.h:107
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ConvertedPhotonProducer::minApproachDisCut_
double minApproachDisCut_
Definition: ConvertedPhotonProducer.h:103
ConvertedPhotonProducer::generalTrackProducer_
edm::EDGetTokenT< reco::TrackCollection > generalTrackProducer_
Definition: ConvertedPhotonProducer.h:71
reco::SuperCluster
Definition: SuperCluster.h:18
edm
HLT enums.
Definition: AlignableModifier.h:19
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
ConvertedPhotonProducer::mFToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mFToken_
Definition: ConvertedPhotonProducer.h:88
ConversionLikelihoodCalculator::calculateLikelihood
double calculateLikelihood(reco::ConversionRef conversion)
Definition: ConversionLikelihoodCalculator.cc:23
ConvertedPhotonProducer::theCaloGeom_
edm::ESHandle< CaloGeometry > theCaloGeom_
Definition: ConvertedPhotonProducer.h:83
edm::SortedCollection< CaloTower >
printConversionInfo.conversionHandle
conversionHandle
Definition: printConversionInfo.py:15
ConvertedPhotonProducer::getCircleCenter
void getCircleCenter(const reco::TrackRef &tk, double r, double &x0, double &y0)
Definition: ConvertedPhotonProducer.cc:620
ConvertedPhotonProducer::hcalTowers_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
Definition: ConvertedPhotonProducer.h:81
HLT_FULL_cff.dPhi
dPhi
Definition: HLT_FULL_cff.py:13702
ConvertedPhotonProducer::cleanCollections
void cleanCollections(const edm::Handle< edm::View< reco::CaloCluster > > &scHandle, const edm::OrphanHandle< reco::ConversionCollection > &conversionHandle, reco::ConversionCollection &outputCollection)
Definition: ConvertedPhotonProducer.cc:531
edm::Handle
Definition: AssociativeIterator.h:50
ConvertedPhotonProducer::transientTrackToken_
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackToken_
Definition: ConvertedPhotonProducer.h:89
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
ConvertedPhotonProducer::conversionOITrackProducer_
edm::EDGetTokenT< reco::TrackCollection > conversionOITrackProducer_
Definition: ConvertedPhotonProducer.h:65
reco::CaloClusterPtr
edm::Ptr< CaloCluster > CaloClusterPtr
Definition: CaloClusterFwd.h:21
ConvertedPhotonProducer::inOutTrackSCAssociationCollection_
edm::EDGetTokenT< reco::TrackCaloClusterPtrAssociation > inOutTrackSCAssociationCollection_
Definition: ConvertedPhotonProducer.h:69
reco::Particle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
ConversionTrackPairFinder
Definition: ConversionTrackPairFinder.h:44
edm::Ref< TrackCollection >
reco::ConversionCollection
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
ConversionVertexFinder
Definition: ConversionVertexFinder.h:29
ConvertedPhotonProducer::theTrackPairFinder_
ConversionTrackPairFinder * theTrackPairFinder_
Definition: ConvertedPhotonProducer.h:91
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
ConversionTrackPairFinder::run
std::map< std::vector< reco::TransientTrack >, reco::CaloClusterPtr, CompareTwoTracksVectors > run(const std::vector< reco::TransientTrack > &outIn, const edm::Handle< reco::TrackCollection > &outInTrkHandle, const edm::Handle< reco::TrackCaloClusterPtrAssociation > &outInTrackSCAssH, const std::vector< reco::TransientTrack > &inOut, const edm::Handle< reco::TrackCollection > &inOutTrkHandle, const edm::Handle< reco::TrackCaloClusterPtrAssociation > &inOutTrackSCAssH)
Definition: ConversionTrackPairFinder.cc:26
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ConvertedPhotonProducer::conf_
edm::ParameterSet conf_
Definition: ConvertedPhotonProducer.h:80
config
Definition: config.py:1
cmsdt::algo
algo
Definition: constants.h:164
edm::FileInPath
Definition: FileInPath.h:64
ConvertedPhotonProducer::algoName_
std::string algoName_
Definition: ConvertedPhotonProducer.h:95
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ConvertedPhotonProducer::dRForConversionRecovery_
double dRForConversionRecovery_
Definition: ConvertedPhotonProducer.h:101
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
edm::PtrVector< CaloCluster >
ConvertedPhotonProducer::caloGeomToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
Definition: ConvertedPhotonProducer.h:87
reco::CaloCluster
Definition: CaloCluster.h:31
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ConvertedPhotonProducer::conversionIOTrackProducer_
edm::EDGetTokenT< reco::TrackCollection > conversionIOTrackProducer_
Definition: ConvertedPhotonProducer.h:66
mps_fire.end
end
Definition: mps_fire.py:242
ConvertedPhotonProducer::ConvertedPhotonCollection_
std::string ConvertedPhotonCollection_
Definition: ConvertedPhotonProducer.h:73
ConvertedPhotonProducer::risolveAmbiguity_
bool risolveAmbiguity_
Definition: ConvertedPhotonProducer.h:105
ConvertedPhotonProducer::theMF_
edm::ESHandle< MagneticField > theMF_
Definition: ConvertedPhotonProducer.h:84
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ConvertedPhotonProducer::bcBarrelCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
Definition: ConvertedPhotonProducer.h:76
ConvertedPhotonProducer::buildCollections
void buildCollections(edm::EventSetup const &es, const edm::Handle< edm::View< reco::CaloCluster > > &scHandle, const edm::Handle< edm::View< reco::CaloCluster > > &bcHandle, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, const edm::Handle< reco::TrackCollection > &trkHandle, std::map< std::vector< reco::TransientTrack >, reco::CaloClusterPtr, CompareTwoTracksVectors > &allPairs, reco::ConversionCollection &outputConvPhotonCollection)
Definition: ConvertedPhotonProducer.cc:282
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::PtrVector::push_back
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
ConvertedPhotonProducer::maxHOverE_
double maxHOverE_
Definition: ConvertedPhotonProducer.h:98
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
ConversionVertexFinder::run
TransientVertex run(const std::vector< reco::TransientTrack > &pair)
Definition: ConversionVertexFinder.cc:135
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
EgammaTowerIsolation
Definition: EgammaTowerIsolation.h:197
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
ConvertedPhotonProducer::toFConverterP
math::XYZPointF toFConverterP(const math::XYZPoint &val)
Definition: ConvertedPhotonProducer.h:110
ConvertedPhotonProducer::hOverEConeSize_
double hOverEConeSize_
Definition: ConvertedPhotonProducer.h:97
p4
double p4[4]
Definition: TauolaWrapper.h:92
ConvertedPhotonProducer::toFConverterV
math::XYZVectorF toFConverterV(const math::XYZVector &val)
Definition: ConvertedPhotonProducer.h:112
reco::Conversion::clone
Conversion * clone() const
returns a clone of the candidate
Definition: Conversion.cc:148
ConvertedPhotonProducer::maxNumOfCandidates_
int maxNumOfCandidates_
Definition: ConvertedPhotonProducer.h:104
ConvertedPhotonProducer::deltaCotCut_
double deltaCotCut_
Definition: ConvertedPhotonProducer.h:102
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::PtrVectorBase::clear
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:79
ConvertedPhotonProducer::solveAmbiguity
std::vector< reco::ConversionRef > solveAmbiguity(const edm::OrphanHandle< reco::ConversionCollection > &conversionHandle, reco::CaloClusterPtr const &sc)
Definition: ConvertedPhotonProducer.cc:571
reco::Conversion::ConversionAlgorithm
ConversionAlgorithm
Definition: Conversion.h:25
edm::Ptr< CaloCluster >
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DDAxes::phi
reco::Conversion::algoByName
static ConversionAlgorithm algoByName(const std::string &name)
Definition: Conversion.cc:139
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::OrphanHandle
Definition: EDProductfwd.h:39
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13701
ConvertedPhotonProducer::calculateMinApproachDistance
float calculateMinApproachDistance(const reco::TrackRef &track1, const reco::TrackRef &track2)
Definition: ConvertedPhotonProducer.cc:604
ConvertedPhotonProducer::scHybridBarrelProducer_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scHybridBarrelProducer_
Definition: ConvertedPhotonProducer.h:78
ConvertedPhotonProducer::likelihoodWeights_
std::string likelihoodWeights_
Definition: ConvertedPhotonProducer.h:108
ConvertedPhotonProducer::minSCEt_
double minSCEt_
Definition: ConvertedPhotonProducer.h:99
ConvertedPhotonProducer::bcEndcapCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
Definition: ConvertedPhotonProducer.h:77
CompareTwoTracksVectors
Definition: ConversionTrackPairFinder.h:38
math::XYZVectorF
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: Vector3D.h:16
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ConvertedPhotonProducer::recoverOneTrackCase_
bool recoverOneTrackCase_
Definition: ConvertedPhotonProducer.h:100
reco::Particle::Point
math::XYZPoint Point
point in the space
Definition: Particle.h:25
ConversionTrackEcalImpactPoint
Definition: ConversionTrackEcalImpactPoint.h:37
ConvertedPhotonProducer::outInTrackSCAssociationCollection_
edm::EDGetTokenT< reco::TrackCaloClusterPtrAssociation > outInTrackSCAssociationCollection_
Definition: ConvertedPhotonProducer.h:68
cms::Exception
Definition: Exception.h:70
genParticles_cff.map
map
Definition: genParticles_cff.py:11
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ConvertedPhotonProducer::theTransientTrackBuilder_
edm::ESHandle< TransientTrackBuilder > theTransientTrackBuilder_
Definition: ConvertedPhotonProducer.h:85
math::XYZPointF
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
reco::TrackTransientTrack
Definition: TrackTransientTrack.h:18
ConvertedPhotonProducer::nEvt_
int nEvt_
Definition: ConvertedPhotonProducer.h:94
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
ConvertedPhotonProducer::theVertexFinder_
ConversionVertexFinder * theVertexFinder_
Definition: ConvertedPhotonProducer.h:92
edm::InputTag
Definition: InputTag.h:15
reco::Vertex
Definition: Vertex.h:35
reco::TrackTransientTrack::persistentTrackRef
TrackRef persistentTrackRef() const
Definition: TrackTransientTrack.h:80
ConvertedPhotonProducer::CleanedConvertedPhotonCollection_
std::string CleanedConvertedPhotonCollection_
Definition: ConvertedPhotonProducer.h:74
ConversionLikelihoodCalculator::setWeightsFile
void setWeightsFile(const char *weightsFile)
Definition: ConversionLikelihoodCalculator.cc:17
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40