CMS 3D CMS Logo

GoodSeedProducer.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFTracking_GoodSeedProducer_H
2 #define RecoParticleFlow_PFTracking_GoodSeedProducer_H
3 // system include files
4 #include <memory>
5 
6 // user include files
7 
20 #include "TMVA/Reader.h"
25 
27 
29 
31 
43 //namespace reco {
44 class PFResolutionMap;
45 // }
46 
47 class PFTrackTransformer;
48 class TrajectoryFitter;
49 class TrajectorySmoother;
50 class TrackerGeometry;
52 
53 namespace goodseedhelpers {
55  constexpr static unsigned int kMaxWeights = 9;
56 
57  public:
59  std::array<std::unique_ptr<const GBRForest>, kMaxWeights> gbr;
60 
61  private:
62  // for temporary variable binding while reading
63  float eP, eta, pt, nhit, dpt, chired, chiRatio;
65  };
66 } // namespace goodseedhelpers
67 
68 class GoodSeedProducer final : public edm::stream::EDProducer<edm::GlobalCache<goodseedhelpers::HeavyObjectCache> > {
70 
71 public:
73 
74  static std::unique_ptr<goodseedhelpers::HeavyObjectCache> initializeGlobalCache(const edm::ParameterSet& conf) {
75  return std::unique_ptr<goodseedhelpers::HeavyObjectCache>(new goodseedhelpers::HeavyObjectCache(conf));
76  }
77 
79 
80 private:
81  void beginRun(const edm::Run& run, const edm::EventSetup&) override;
82  void produce(edm::Event&, const edm::EventSetup&) override;
83 
85  int getBin(float, float);
86 
87  void fillPreIdRefValueMap(edm::Handle<reco::TrackCollection> tkhandle,
90  // ----------member data ---------------------------
91 
94 
97 
100 
102  std::unique_ptr<TrajectoryFitter> fitter_;
103 
105  std::unique_ptr<TrajectorySmoother> smoother_;
106 
107  // needed by the above
109 
111  std::unique_ptr<PFTrackTransformer> pfTransformer_;
112 
115 
117  double minPt_;
118  double maxPt_;
119  double maxEta_;
120 
126  double minEoverP_;
127  double maxHoverP_;
128 
131 
133  double minEp_;
134  double maxEp_;
135 
138 
141 
144 
147 
149  float thr[150];
150 
151  // ----------access to event data
156  std::vector<edm::EDGetTokenT<std::vector<Trajectory> > > trajContainers_;
157  std::vector<edm::EDGetTokenT<reco::TrackCollection> > tracksContainers_;
158 
163 
164  std::unique_ptr<PFResolutionMap> resMapEtaECAL_;
165  std::unique_ptr<PFResolutionMap> resMapPhiECAL_;
166 
170 
172  float eP, eta, pt, nhit, dpt, chired, chiRatio;
174  double Min_dr_;
175 
177  bool useTmva_;
178 
181 
184 
186  std::map<reco::TrackRef, unsigned> refMap_;
187 
189 };
190 #endif
int nHitsInSeed_
Number of hits in the seed;.
std::string preidckf_
Name of the Seed(Ckf) Collection.
edm::EDGetTokenT< reco::PFClusterCollection > pfCLusTagPSLabel_
TrackQuality
track quality
Definition: TrackBase.h:150
std::unique_ptr< TrajectorySmoother > smoother_
Smoother.
std::unique_ptr< PFResolutionMap > resMapEtaECAL_
General CMS geometry parameters used during Particle Flow reconstruction or drawing. All methods and members are static.
Definition: PFGeometry.h:23
double EcalStripSumE_minClusEnergy_
TkClonerImpl hitCloner
std::unique_ptr< TrajectoryFitter > fitter_
Fitter.
edm::ParameterSet conf_
std::string method_
TMVA method.
HeavyObjectCache(const edm::ParameterSet &conf)
double EcalStripSumE_deltaEta_
double EcalStripSumE_deltaPhiOverQ_minValue_
double EcalStripSumE_deltaPhiOverQ_maxValue_
TrajectoryStateOnSurface TSOS
math::XYZVector B_
B field.
std::string preidname_
Name of the preid Collection (FB)
PFGeometry pfGeometry_
std::string propagatorName_
bool useQuality_
TRACK QUALITY.
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tracksContainers_
double minPt_
Minimum transverse momentum and maximum pseudorapidity.
std::string fitterName_
bool disablePreId_
switch to disable the pre-id
static void globalEndJob(goodseedhelpers::HeavyObjectCache const *)
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:455
reco::TrackBase::TrackQuality trackQuality_
double clusThreshold_
Cut on the energy of the clusters.
std::array< std::unique_ptr< const GBRForest >, kMaxWeights > gbr
bool produceCkfseed_
Produce the Seed for Ckf tracks?
bool useTmva_
USE OF TMVA.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
std::unique_ptr< PFResolutionMap > resMapPhiECAL_
std::map< reco::TrackRef, unsigned > refMap_
Map used to create the TrackRef, PreIdRef value map.
bool producePreId_
Produce the pre-id debugging collection.
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
std::string trackerRecHitBuilderName_
std::string smootherName_
edm::EDGetTokenT< reco::PFClusterCollection > pfCLusTagHCLabel_
Resolution Map (resolution as a function of eta and E)
std::string preidgsf_
Name of the Seed(Gsf) Collection.
edm::EDGetTokenT< reco::PFClusterCollection > pfCLusTagECLabel_
double minEp_
Min and MAx allowed values forEoverP.
std::vector< edm::EDGetTokenT< std::vector< Trajectory > > > trajContainers_
static std::unique_ptr< goodseedhelpers::HeavyObjectCache > initializeGlobalCache(const edm::ParameterSet &conf)
#define constexpr
Definition: Run.h:45
double PtThresholdSavePredId_
Threshold to save Pre Idinfo.