CMS 3D CMS Logo

TrackAssociator.h
Go to the documentation of this file.
1 #ifndef HTrackAssociator_HTrackAssociator_h
2 #define HTrackAssociator_HTrackAssociator_h 1
3 
4 // -*- C++ -*-
5 //
6 // Package: HTrackAssociator
7 // Class: HTrackAssociator
8 //
9 /*
10 
11  Description: <one line class summary>
12 
13  Implementation:
14  <Notes on implementation>
15 */
16 //
17 // Original Author: Dmytro Kovalskyi
18 // Modified for ECAL+HCAL by: Michal Szleper
19 //
20 
26 
30 
35 
42 
45 
47 public:
50 
52  public:
54  // default parameters
55  // define match cones, dR=sqrt(dEta^2+dPhi^2)
56  dREcal = 0.03;
57  dRHcal = 0.07;
58  dRCalo = 0.07;
59 
60  idREcal = 1;
61  idRHcal = 4;
62  idRCalo = 4;
63 
64  // match all sub-detectors by default
65  useEcal = true;
66  useHcal = true;
67  useCalo = true;
68  }
69  double dREcal;
70  double dRHcal;
71  double dRCalo;
72  int idREcal;
73  int idRHcal;
74  int idRCalo;
75 
76  bool useEcal;
77  bool useHcal;
78  bool useCalo;
79  };
80 
91  const edm::EventSetup&,
92  const FreeTrajectoryState&,
93  const HAssociatorParameters&);
94 
97  std::vector<EcalRecHit> associateEcal(const edm::Event&,
98  const edm::EventSetup&,
99  const FreeTrajectoryState&,
100  const double dR = -1);
101 
104  double getEcalEnergy(const edm::Event&, const edm::EventSetup&, const FreeTrajectoryState&, const double dR = -1);
105 
108  std::vector<CaloTower> associateHcal(const edm::Event&,
109  const edm::EventSetup&,
110  const FreeTrajectoryState&,
111  const double dR = -1);
112 
115  double getHcalEnergy(const edm::Event&, const edm::EventSetup&, const FreeTrajectoryState&, const double dR = -1);
117  void setPropagator(Propagator*);
118 
120  void useDefaultPropagator();
121 
124  const std::string moduleLabel,
125  const std::string productInstanceLabel = "");
126 
130 
131 private:
132  void fillEcal(const edm::Event&,
133  const edm::EventSetup&,
135  const FreeTrajectoryState&,
136  const int,
137  const double);
138 
139  void fillHcal(const edm::Event&,
140  const edm::EventSetup&,
142  const FreeTrajectoryState&,
143  const int,
144  const double);
145 
146  void fillHcalTowers(const edm::Event&,
147  const edm::EventSetup&,
149  const FreeTrajectoryState&,
150  const int,
151  const double);
152 
153  void fillCaloTowers(const edm::Event&,
154  const edm::EventSetup&,
156  const FreeTrajectoryState&,
157  const int,
158  const double);
159 
160  void init(const edm::EventSetup&);
161 
162  math::XYZPoint getPoint(const GlobalPoint& point) { return math::XYZPoint(point.x(), point.y(), point.z()); }
163 
164  math::XYZPoint getPoint(const LocalPoint& point) { return math::XYZPoint(point.x(), point.y(), point.z()); }
165 
166  math::XYZVector getVector(const GlobalVector& vec) { return math::XYZVector(vec.x(), vec.y(), vec.z()); }
167 
168  math::XYZVector getVector(const LocalVector& vec) { return math::XYZVector(vec.x(), vec.y(), vec.z()); }
169 
173  int debug_;
174  std::vector<std::vector<std::set<uint32_t> > >* caloTowerMap_;
175 
179 
181 
184  std::vector<std::string> EBRecHitCollectionLabels;
185  std::vector<std::string> EERecHitCollectionLabels;
187  std::vector<std::string> HBHERecHitCollectionLabels;
189  std::vector<std::string> CaloTowerCollectionLabels;
190 };
191 #endif
edm::ESHandle< CaloGeometry > theCaloGeometry_
std::vector< std::string > EERecHitCollectionLabels
FreeTrajectoryState getFreeTrajectoryState(const edm::EventSetup &, const reco::Track &)
get FreeTrajectoryState from different track representations
double getHcalEnergy(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
std::vector< std::string > CaloTowerCollectionLabels
CaloTowers.
Propagator * defProp_
std::vector< std::string > EBRecHitCollectionLabels
T y() const
Definition: PV3DBase.h:60
double getEcalEnergy(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
math::XYZVector getVector(const GlobalVector &vec)
std::vector< std::vector< std::set< uint32_t > > > * caloTowerMap_
void setPropagator(Propagator *)
use a user configured propagator
void addDataLabels(const std::string className, const std::string moduleLabel, const std::string productInstanceLabel="")
specify names of EDProducts to use for different input data types
math::XYZPoint getPoint(const LocalPoint &point)
Propagator * ivProp_
std::vector< std::string > HBHERecHitCollectionLabels
HCAL.
math::XYZVector getVector(const LocalVector &vec)
void fillEcal(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
void fillHcal(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
T z() const
Definition: PV3DBase.h:61
HTrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const HAssociatorParameters &)
void fillHcalTowers(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
HEcalDetIdAssociator ecalDetIdAssociator_
HCaloDetIdAssociator caloDetIdAssociator_
void useDefaultPropagator()
use the default propagator
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void fillCaloTowers(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
void init(const edm::EventSetup &)
std::vector< EcalRecHit > associateEcal(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
T x() const
Definition: PV3DBase.h:59
std::vector< CaloTower > associateHcal(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
HHcalDetIdAssociator hcalDetIdAssociator_
math::XYZPoint getPoint(const GlobalPoint &point)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
std::string className(const T &t)
Definition: ClassName.h:31