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 
163 
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
Vector3DBase
Definition: Vector3DBase.h:8
Propagator.h
HTrackAssociator::ecalDetIdAssociator_
HEcalDetIdAssociator ecalDetIdAssociator_
Definition: TrackAssociator.h:176
Handle.h
SimVertex
Definition: SimVertex.h:5
HTrackAssociator
Definition: TrackAssociator.h:46
CaloTower.h
HTrackAssociator::fillEcal
void fillEcal(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
Definition: TrackAssociator.cc:198
HTrackAssociator::associate
HTrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const HAssociatorParameters &)
Definition: TrackAssociator.cc:116
ESHandle.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
HTrackAssociator::fillHcal
void fillHcal(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
Definition: TrackAssociator.cc:396
TrackBase.h
HTrackAssociator::HAssociatorParameters::useHcal
bool useHcal
Definition: TrackAssociator.h:77
HTrackAssociator::fillCaloTowers
void fillCaloTowers(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
Definition: TrackAssociator.cc:275
HTrackAssociator::init
void init(const edm::EventSetup &)
Definition: TrackAssociator.cc:95
HTrackAssociator::fillHcalTowers
void fillHcalTowers(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
Definition: TrackAssociator.cc:477
TrackDetMatchInfo.h
HHcalDetIdAssociator
Definition: HcalDetIdAssociator.h:24
HTrackAssociator::useDefaultPropagator
void useDefaultPropagator()
use the default propagator
Definition: TrackAssociator.cc:92
HTrackAssociator::HTrackAssociator
HTrackAssociator()
Definition: TrackAssociator.cc:44
HTrackAssociator::HAssociatorParameters::dRHcal
double dRHcal
Definition: TrackAssociator.h:70
HTrackAssociator::hcalDetIdAssociator_
HHcalDetIdAssociator hcalDetIdAssociator_
Definition: TrackAssociator.h:177
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Propagator
Definition: Propagator.h:44
Track.h
HTrackAssociator::HAssociatorParameters::HAssociatorParameters
HAssociatorParameters()
Definition: TrackAssociator.h:53
HTrackAssociator::associateEcal
std::vector< EcalRecHit > associateEcal(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
Definition: TrackAssociator.cc:138
HTrackAssociator::getPoint
math::XYZPoint getPoint(const GlobalPoint &point)
Definition: TrackAssociator.h:162
OrphanHandle.h
SimVertex.h
reco::Track
Definition: Track.h:27
edm::ESHandle< CaloGeometry >
Point3DBase< float, GlobalTag >
HTrackAssociator::associateHcal
std::vector< CaloTower > associateHcal(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
Definition: TrackAssociator.cc:168
CaloDetIdAssociator.h
HTrackAssociator::useDefaultPropagator_
bool useDefaultPropagator_
Definition: TrackAssociator.h:172
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HTrackAssociator::CaloTowerCollectionLabels
std::vector< std::string > CaloTowerCollectionLabels
CaloTowers.
Definition: TrackAssociator.h:189
HTrackAssociator::defProp_
Propagator * defProp_
Definition: TrackAssociator.h:171
HTrackAssociator::HAssociatorParameters
Definition: TrackAssociator.h:51
HTrackAssociator::theCaloGeometry_
edm::ESHandle< CaloGeometry > theCaloGeometry_
Definition: TrackAssociator.h:180
HTrackAssociator::HAssociatorParameters::useCalo
bool useCalo
Definition: TrackAssociator.h:78
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
HTrackAssociator::~HTrackAssociator
~HTrackAssociator()
Definition: TrackAssociator.cc:52
Event.h
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
HTrackAssociator::HAssociatorParameters::dREcal
double dREcal
Definition: TrackAssociator.h:69
HTrackAssociator::EERecHitCollectionLabels
std::vector< std::string > EERecHitCollectionLabels
Definition: TrackAssociator.h:185
HTrackAssociator::EBRecHitCollectionLabels
std::vector< std::string > EBRecHitCollectionLabels
Definition: TrackAssociator.h:184
HTrackAssociator::getFreeTrajectoryState
FreeTrajectoryState getFreeTrajectoryState(const edm::EventSetup &, const reco::Track &)
get FreeTrajectoryState from different track representations
Definition: TrackAssociator.cc:570
HTrackAssociator::caloTowerMap_
std::vector< std::vector< std::set< uint32_t > > > * caloTowerMap_
Definition: TrackAssociator.h:174
edm::EventSetup
Definition: EventSetup.h:57
EcalRecHit.h
HcalDetIdAssociator.h
HTrackAssociator::getVector
math::XYZVector getVector(const GlobalVector &vec)
Definition: TrackAssociator.h:166
HTrackDetMatchInfo
Definition: TrackDetMatchInfo.h:10
HTrackAssociator::ivProp_
Propagator * ivProp_
Definition: TrackAssociator.h:170
HBHERecHit.h
HTrackAssociator::getHcalEnergy
double getHcalEnergy(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
Definition: TrackAssociator.cc:183
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
SimTrack
Definition: SimTrack.h:6
HTrackAssociator::HAssociatorParameters::useEcal
bool useEcal
Definition: TrackAssociator.h:76
HTrackAssociator::getEcalEnergy
double getEcalEnergy(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1)
Definition: TrackAssociator.cc:153
CaloGeometry.h
Point3D.h
EventSetup.h
className
std::string className(const T &t)
Definition: ClassName.h:31
HTrackAssociator::setPropagator
void setPropagator(Propagator *)
use a user configured propagator
Definition: TrackAssociator.cc:84
HTrackAssociator::HAssociatorParameters::idRCalo
int idRCalo
Definition: TrackAssociator.h:74
HCaloDetIdAssociator
Definition: CaloDetIdAssociator.h:26
EcalDetIdAssociator.h
SimTrack.h
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
HTrackAssociator::getVector
math::XYZVector getVector(const LocalVector &vec)
Definition: TrackAssociator.h:168
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
HEcalDetIdAssociator
Definition: EcalDetIdAssociator.h:22
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
HTrackAssociator::debug_
int debug_
Definition: TrackAssociator.h:173
edm::Event
Definition: Event.h:73
Vector3D.h
HTrackAssociator::addDataLabels
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
Definition: TrackAssociator.cc:58
HTrackAssociator::HBHERecHitCollectionLabels
std::vector< std::string > HBHERecHitCollectionLabels
HCAL.
Definition: TrackAssociator.h:187
HTrackAssociator::HAssociatorParameters::dRCalo
double dRCalo
Definition: TrackAssociator.h:71
HTrackAssociator::HAssociatorParameters::idRHcal
int idRHcal
Definition: TrackAssociator.h:73
HTrackAssociator::caloDetIdAssociator_
HCaloDetIdAssociator caloDetIdAssociator_
Definition: TrackAssociator.h:178
HTrackAssociator::getPoint
math::XYZPoint getPoint(const LocalPoint &point)
Definition: TrackAssociator.h:164
HTrackAssociator::HAssociatorParameters::idREcal
int idREcal
Definition: TrackAssociator.h:72