CMS 3D CMS Logo

Classes | Functions
TICLCandidateProducer.cc File Reference
#include <memory>
#include "CommonTools/RecoAlgos/interface/MultiVectorManager.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/PluginDescription.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "DataFormats/Common/interface/OrphanHandle.h"
#include "DataFormats/CaloRecHit/interface/CaloCluster.h"
#include "DataFormats/HGCalReco/interface/Common.h"
#include "DataFormats/HGCalReco/interface/MtdHostCollection.h"
#include "DataFormats/HGCalReco/interface/TICLLayerTile.h"
#include "DataFormats/HGCalReco/interface/Trackster.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/GeometrySurface/interface/BoundDisk.h"
#include "DataFormats/HGCalReco/interface/TICLCandidate.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
#include "RecoHGCal/TICL/interface/TICLInterpretationAlgoBase.h"
#include "RecoHGCal/TICL/plugins/TICLInterpretationPluginFactory.h"
#include "RecoHGCal/TICL/plugins/GeneralInterpretationAlgo.h"
#include "RecoParticleFlow/PFProducer/interface/PFMuonAlgo.h"
#include "RecoHGCal/TICL/interface/GlobalCache.h"
#include "CommonTools/Utils/interface/StringCutObjectSelector.h"
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
#include "TrackingTools/GeomPropagators/interface/Propagator.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateClosestToBeamLine.h"
#include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "TrackstersPCA.h"

Go to the source code of this file.

Classes

class  TICLCandidateProducer
 

Functions

void filterTracks (edm::Handle< std::vector< reco::Track >> tkH, const edm::Handle< std::vector< reco::Muon >> &muons_h, const StringCutObjectSelector< reco::Track > cutTk_, const float tkEnergyCut_, std::vector< bool > &maskTracks)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< TICLCandidateProducer > > s_filler_0__LINE__ ("TICLCandidateProducer")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TICLCandidateProducer > > s_maker__LINE__ ("TICLCandidateProducer")
 

Function Documentation

◆ filterTracks()

void filterTracks ( edm::Handle< std::vector< reco::Track >>  tkH,
const edm::Handle< std::vector< reco::Muon >> &  muons_h,
const StringCutObjectSelector< reco::Track cutTk_,
const float  tkEnergyCut_,
std::vector< bool > &  maskTracks 
)

Definition at line 197 of file TICLCandidateProducer.cc.

References mps_fire::i, PFMuonAlgo::isMuon(), ticl::mpion2, PFMuonAlgo::muAssocToTrack(), or, mathSSE::sqrt(), and DiMuonV_cfg::tracks.

Referenced by EopElecTreeWriter::analyze(), and TICLCandidateProducer::produce().

201  {
202  auto const &tracks = *tkH;
203  for (unsigned i = 0; i < tracks.size(); ++i) {
204  const auto &tk = tracks[i];
205  reco::TrackRef trackref = reco::TrackRef(tkH, i);
206 
207  // veto tracks associated to muons
208  int muId = PFMuonAlgo::muAssocToTrack(trackref, *muons_h);
209  const reco::MuonRef muonref = reco::MuonRef(muons_h, muId);
210 
211  if (!cutTk_((tk)) or (muId != -1 and PFMuonAlgo::isMuon(muonref) and not(*muons_h)[muId].isTrackerMuon())) {
212  maskTracks[i] = false;
213  continue;
214  }
215 
216  // don't consider tracks below 2 GeV for linking
217  if (std::sqrt(tk.p() * tk.p() + ticl::mpion2) < tkEnergyCut_) {
218  maskTracks[i] = false;
219  continue;
220  }
221 
222  // record tracks that can be used to make a ticlcandidate
223  maskTracks[i] = true;
224  }
225 }
static int muAssocToTrack(const reco::TrackRef &trackref, const reco::MuonCollection &muons)
Definition: PFMuonAlgo.cc:479
static bool isMuon(const reco::PFBlockElement &elt)
Definition: PFMuonAlgo.cc:48
T sqrt(T t)
Definition: SSEVec.h:23
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::Ref< MuonCollection > MuonRef
presistent reference to a Muon
Definition: MuonFwd.h:13
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
constexpr float mpion2
Definition: Common.h:41

◆ s_filler_0__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< TICLCandidateProducer > > s_filler_0__LINE__ ( "TICLCandidateProducer"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TICLCandidateProducer > > s_maker__LINE__ ( "TICLCandidateProducer"  )
static