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 
46 
48  public:
51 
53  public:
55  // default parameters
56  // define match cones, dR=sqrt(dEta^2+dPhi^2)
57  dREcal = 0.03;
58  dRHcal = 0.07;
59  dRCalo = 0.07;
60 
61  idREcal = 1;
62  idRHcal = 4;
63  idRCalo = 4;
64 
65  // match all sub-detectors by default
66  useEcal = true;
67  useHcal = true;
68  useCalo = true;
69  }
70  double dREcal;
71  double dRHcal;
72  double dRCalo;
73  int idREcal;
74  int idRHcal;
75  int idRCalo;
76 
77  bool useEcal;
78  bool useHcal;
79  bool useCalo;
80  };
81 
82 
93  const edm::EventSetup&,
94  const FreeTrajectoryState&,
95  const HAssociatorParameters& );
96 
99  std::vector<EcalRecHit> associateEcal( const edm::Event&,
100  const edm::EventSetup&,
101  const FreeTrajectoryState&,
102  const double dR = -1 );
103 
106  double getEcalEnergy( const edm::Event&,
107  const edm::EventSetup&,
108  const FreeTrajectoryState&,
109  const double dR = -1 );
110 
113  std::vector<CaloTower> associateHcal( const edm::Event&,
114  const edm::EventSetup&,
115  const FreeTrajectoryState&,
116  const double dR = -1 );
117 
120  double getHcalEnergy( const edm::Event&,
121  const edm::EventSetup&,
122  const FreeTrajectoryState&,
123  const double dR = -1 );
125  void setPropagator( Propagator* );
126 
128  void useDefaultPropagator();
129 
131  void addDataLabels( const std::string className,
132  const std::string moduleLabel,
133  const std::string productInstanceLabel = "");
134 
137  const reco::Track& );
139  const SimTrack&,
140  const SimVertex& );
141 
142  private:
143  void fillEcal( const edm::Event&,
144  const edm::EventSetup&,
146  const FreeTrajectoryState&,
147  const int,
148  const double);
149 
150  void fillHcal( const edm::Event&,
151  const edm::EventSetup&,
153  const FreeTrajectoryState&,
154  const int,
155  const double);
156 
157  void fillHcalTowers( const edm::Event&,
158  const edm::EventSetup&,
160  const FreeTrajectoryState&,
161  const int,
162  const double);
163 
164  void fillCaloTowers( const edm::Event&,
165  const edm::EventSetup&,
167  const FreeTrajectoryState&,
168  const int,
169  const double);
170 
171  void init( const edm::EventSetup&);
172 
174  {
175  return math::XYZPoint(point.x(),point.y(),point.z());
176  }
177 
179  {
180  return math::XYZPoint(point.x(),point.y(),point.z());
181  }
182 
184  {
185  return math::XYZVector(vec.x(),vec.y(),vec.z());
186  }
187 
189  {
190  return math::XYZVector(vec.x(),vec.y(),vec.z());
191  }
192 
196  int debug_;
197  std::vector<std::vector<std::set<uint32_t> > >* caloTowerMap_;
198 
202 
204 
207  std::vector<std::string> EBRecHitCollectionLabels;
208  std::vector<std::string> EERecHitCollectionLabels;
210  std::vector<std::string> HBHERecHitCollectionLabels;
212  std::vector<std::string> CaloTowerCollectionLabels;
213 };
214 #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:63
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:64
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:30
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:62
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:30