Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDetectorMatches.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DDetectorMatches_factory.h
4 // Created: Tue Aug 9 14:29:24 EST 2011
5 // Creator: pmatt (on Linux ifarml6 2.6.18-128.el5 x86_64)
6 //
7 
8 #ifndef _DDetectorMatches_
9 #define _DDetectorMatches_
10 
11 #include <vector>
12 #include <memory>
13 #include <utility>
14 #include <string>
15 
16 #include <TRACKING/DTrackingData.h>
17 #include <TOF/DTOFPoint.h>
18 #include <BCAL/DBCALShower.h>
19 #include <FCAL/DFCALShower.h>
20 #include <START_COUNTER/DSCHit.h>
21 #include <DIRC/DDIRCPmtHit.h>
22 #include <DIRC/DDIRCTruthPmtHit.h>
23 
24 using namespace std;
25 
27 {
28  public:
29  DBCALShowerMatchParams(void) : dBCALShower(NULL),
30  dx(0.0), dFlightTime(0.0), dFlightTimeVariance(0.0), dPathLength(0.0), dDeltaPhiToShower(0.0), dDeltaPhiToShowerCut(0.0),dDeltaZToShower(0.0){}
31 
33 
34  double dx; //the distance the track traveled through the detector system up to the shower position
35  double dFlightTime; //flight time from DKinematicData::position() to the shower
37  double dPathLength; //path length from DKinematicData::position() to the shower
38  double dDeltaPhiToShower; //between track and shower //is signed: BCAL - Track //in radians
39  double dDeltaPhiToShowerCut; //momentum-dependent cut //in degrees
40  double dDeltaZToShower; //between track and shower //is signed: BCAL - Track
41 
42  double Get_DistanceToTrack(void) const
43  {
44  double locRSq = dBCALShower->x*dBCALShower->x + dBCALShower->y*dBCALShower->y;
45  return sqrt(dDeltaZToShower*dDeltaZToShower + dDeltaPhiToShower*dDeltaPhiToShower*locRSq);
46  }
47 };
48 
50 {
51  public:
52  DFCALShowerMatchParams(void) : dFCALShower(NULL),
53  dx(0.0), dFlightTime(0.0), dFlightTimeVariance(0.0), dPathLength(0.0), dDOCAToShower(0.0){}
54 
56 
57  double dx; //the distance the track traveled through the detector system up to the shower position
58  double dFlightTime; //flight time from DKinematicData::position() to the shower
60  double dPathLength; //path length from DKinematicData::position() to the shower
61  double dDOCAToShower; //DOCA of track to shower
62 };
63 
65 {
66  public:
67  DTOFHitMatchParams(void) : dTOFPoint(NULL),
68  dHitTime(0.0), dHitTimeVariance(0.0), dHitEnergy(0.0), dEdx(0.0), dFlightTime(0.0), dFlightTimeVariance(0.0),
69  dPathLength(0.0), dDeltaXToHit(0.0), dDeltaYToHit(0.0){}
70 
72 
73  double dHitTime; //This can be different from DTOFPoint::t, if the DTOFPoint was (e.g.) an unmatched, single-ended paddle
74  double dHitTimeVariance; //This can be different from DTOFPoint::tErr, if the DTOFPoint was (e.g.) an unmatched, single-ended paddle
75  double dHitEnergy; //This can be different from DTOFPoint::dE, if the DTOFPoint was (e.g.) an unmatched, single-ended paddle
76 
77  double dEdx; //dE/dx; dE: the energy lost by the track, dx: the distance the track traveled through the detector system (dHitEnergy/dEdx)
78  double dFlightTime; //flight time from DKinematicData::position() to the hit
80  double dPathLength; //path length from DKinematicData::position() to the hit
81  double dDeltaXToHit; //between track and hit //is signed: TOF - Track //is LARGE if TOF x-position not well-defined!
82  double dDeltaYToHit; //between track and hit //is signed: TOF - Track //is LARGE if TOF x-position not well-defined!
83 
84  double Get_DistanceToTrack(void) const
85  {
86  return sqrt(dDeltaXToHit*dDeltaXToHit + dDeltaYToHit*dDeltaYToHit);
87  }
88 };
89 
91 {
92  public:
93  DSCHitMatchParams(void) : dSCHit(NULL), dHitTime(0.0), dHitTimeVariance(0.0),
94  dHitEnergy(0.0), dEdx(0.0), dFlightTime(0.0), dFlightTimeVariance(0.0), dPathLength(0.0), dDeltaPhiToHit(0.0){}
95 
96  const DSCHit* dSCHit;
97 
98  double dHitTime; //not the same as DSCHit time: corrected for propagation along scintillator
100  double dHitEnergy; //not the same as DSCHit energy: corrected for attenuation
101 
102  double dEdx; //dE/dx; dE: the energy lost by the track, dx: the distance the track traveled through the detector system (dHitEnergy/dEdx)
103  double dFlightTime; //flight time from DKinematicData::position() to the hit
105  double dPathLength; //path length from DKinematicData::position() to the hit
106  double dDeltaPhiToHit; //difference in phi between track and hit //units in radians
107 };
108 
110 {
111  public:
112  DDIRCMatchParams(void) : dExpectedThetaC(0.0), dThetaC(0.0), dDeltaT(0.0), dLikelihoodElectron(0.0), dLikelihoodPion(0.0), dLikelihoodKaon(0.0), dLikelihoodProton(0.0), dNPhotons(0), dExtrapolatedPos(0,0,0), dExtrapolatedMom(0,0,0){}
113 
114  double dExpectedThetaC, dThetaC, dDeltaT;
115  double dLikelihoodElectron, dLikelihoodPion, dLikelihoodKaon, dLikelihoodProton;
117  DVector3 dExtrapolatedPos, dExtrapolatedMom;
119 };
120 
121 class DDetectorMatches : public JObject
122 {
123  public:
124  JOBJECT_PUBLIC(DDetectorMatches);
125 
126  //GETTERS:
127  inline bool Get_BCALMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DBCALShowerMatchParams> >& locMatchParams) const;
128  inline bool Get_FCALMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DFCALShowerMatchParams> >& locMatchParams) const;
129  inline bool Get_TOFMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DTOFHitMatchParams> >& locMatchParams) const;
130  inline bool Get_SCMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DSCHitMatchParams> >& locMatchParams) const;
131  inline bool Get_DIRCMatchParams(const DTrackingData* locTrack, shared_ptr<const DDIRCMatchParams>& locMatchParams) const;
132 
133  inline bool Get_IsMatchedToTrack(const DBCALShower* locBCALShower) const;
134  inline bool Get_IsMatchedToTrack(const DFCALShower* locFCALShower) const;
135  inline bool Get_IsMatchedToHit(const DTrackingData* locTrack) const;
136  inline bool Get_IsMatchedToDetector(const DTrackingData* locTrack, DetectorSystem_t locDetectorSystem) const;
137 
138  inline bool Get_TrackMatchParams(const DBCALShower* locBCALShower, vector<shared_ptr<const DBCALShowerMatchParams> >& locMatchParams) const;
139  inline bool Get_TrackMatchParams(const DFCALShower* locFCALShower, vector<shared_ptr<const DFCALShowerMatchParams> >& locMatchParams) const;
140  inline bool Get_TrackMatchParams(const DTOFPoint* locTOFPoint, vector<shared_ptr<const DTOFHitMatchParams> >& locMatchParams) const;
141  inline bool Get_TrackMatchParams(const DSCHit* locSCHit, vector<shared_ptr<const DSCHitMatchParams> >& locMatchParams) const;
142  inline bool Get_DIRCTrackMatchParamsMap(map<shared_ptr<const DDIRCMatchParams>, vector<const DDIRCPmtHit*> >& locDIRCTrackMatchParamsMap);
143 
144  inline bool Get_DistanceToNearestTrack(const DBCALShower* locBCALShower, double& locDistance) const;
145  inline bool Get_DistanceToNearestTrack(const DBCALShower* locBCALShower, double& locDeltaPhi, double& locDeltaZ) const;
146  inline bool Get_DistanceToNearestTrack(const DFCALShower* locFCALShower, double& locDistance) const;
147 
148  inline bool Get_FlightTimePCorrelation(const DTrackingData* locTrack, DetectorSystem_t locDetectorSystem, double& locCorrelation) const;
149 
150  //Get # Matches
151  inline size_t Get_NumTrackBCALMatches(void) const;
152  inline size_t Get_NumTrackFCALMatches(void) const;
153  inline size_t Get_NumTrackTOFMatches(void) const;
154  inline size_t Get_NumTrackSCMatches(void) const;
155  inline size_t Get_NumTrackDIRCMatches(void) const;
156 
157  //SETTERS:
158  inline void Add_Match(const DTrackingData* locTrack, const DBCALShower* locBCALShower, const shared_ptr<const DBCALShowerMatchParams>& locShowerMatchParams);
159  inline void Add_Match(const DTrackingData* locTrack, const DFCALShower* locFCALShower, const shared_ptr<const DFCALShowerMatchParams>& locShowerMatchParams);
160  inline void Add_Match(const DTrackingData* locTrack, const DTOFPoint* locTOFPoint, const shared_ptr<const DTOFHitMatchParams>& locHitMatchParams);
161  inline void Add_Match(const DTrackingData* locTrack, const DSCHit* locSCHit, const shared_ptr<const DSCHitMatchParams>& locHitMatchParams);
162  inline void Add_Match(const DTrackingData* locTrack, const shared_ptr<const DDIRCMatchParams>& locDIRCMatchParams);
163  inline void Set_DistanceToNearestTrack(const DBCALShower* locBCALShower, double locDeltaPhi, double locDeltaZ);
164  inline void Set_DistanceToNearestTrack(const DFCALShower* locFCALShower, double locDistanceToNearestTrack);
165  inline void Set_FlightTimePCorrelation(const DTrackingData* locTrack, DetectorSystem_t locDetectorSystem, double locCorrelation);
166 
167  void toStrings(vector<pair<string,string> >& items) const
168  {
169  AddString(items, "#_Track_BCAL_Matches", "%d", Get_NumTrackBCALMatches());
170  AddString(items, "#_Track_FCAL_Matches", "%d", Get_NumTrackFCALMatches());
171  AddString(items, "#_Track_TOF_Matches", "%d", Get_NumTrackTOFMatches());
172  AddString(items, "#_Track_SC_Matches", "%d", Get_NumTrackSCMatches());
173  AddString(items, "#_Track_DIRC_Matches", "%d", Get_NumTrackDIRCMatches());
174  }
175 
176  private:
177 
178  //for each track, stores the information about each match
179  map<const DTrackingData*, vector<shared_ptr<const DBCALShowerMatchParams> > > dTrackBCALMatchParams;
180  map<const DTrackingData*, vector<shared_ptr<const DFCALShowerMatchParams> > > dTrackFCALMatchParams;
181  map<const DTrackingData*, vector<shared_ptr<const DTOFHitMatchParams> > > dTrackTOFMatchParams;
182  map<const DTrackingData*, vector<shared_ptr<const DSCHitMatchParams> > > dTrackSCMatchParams;
183  map<const DTrackingData*, shared_ptr<const DDIRCMatchParams> > dTrackDIRCMatchParams;
184 
185  //reverse-direction maps of the above (match params are the same objects)
186  map<const DBCALShower*, vector<shared_ptr<const DBCALShowerMatchParams> > > dBCALTrackMatchParams;
187  map<const DFCALShower*, vector<shared_ptr<const DFCALShowerMatchParams> > > dFCALTrackMatchParams;
188  map<const DTOFPoint*, vector<shared_ptr<const DTOFHitMatchParams> > > dTOFTrackMatchParams;
189  map<const DSCHit*, vector<shared_ptr<const DSCHitMatchParams> > > dSCTrackMatchParams;
190  map<shared_ptr<const DDIRCMatchParams>, vector<const DDIRCPmtHit*> > dDIRCTrackMatchParams;
191 
192  //correlations between: (the flight time from a given detector system hit/shower to DKinematicData::position()), and the momentum at DKinematicData::position()
193  //Note that it is assumed that these correlations will not change between the different objects of each type
194  map<const DTrackingData*, map<DetectorSystem_t, double> > dFlightTimePCorrelations;
195 
196  //for BDT: help to determine if a shower is neutral or not
197  map<const DBCALShower*, pair<double, double> > dBCALShowerDistanceToNearestTrack; //first double is delta-phi, second is delta-z
198  map<const DFCALShower*, double> dFCALShowerDistanceToNearestTrack;
199 };
200 
201 inline bool DDetectorMatches::Get_BCALMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DBCALShowerMatchParams> >& locMatchParams) const
202 {
203  locMatchParams.clear();
204  auto locIterator = dTrackBCALMatchParams.find(locTrack);
205  if(locIterator == dTrackBCALMatchParams.end())
206  return false;
207  locMatchParams = locIterator->second;
208  return true;
209 }
210 
211 inline bool DDetectorMatches::Get_FCALMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DFCALShowerMatchParams> >& locMatchParams) const
212 {
213  locMatchParams.clear();
214  auto locIterator = dTrackFCALMatchParams.find(locTrack);
215  if(locIterator == dTrackFCALMatchParams.end())
216  return false;
217  locMatchParams = locIterator->second;
218  return true;
219 }
220 
221 inline bool DDetectorMatches::Get_TOFMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DTOFHitMatchParams> >& locMatchParams) const
222 {
223  locMatchParams.clear();
224  auto locIterator = dTrackTOFMatchParams.find(locTrack);
225  if(locIterator == dTrackTOFMatchParams.end())
226  return false;
227  locMatchParams = locIterator->second;
228  return true;
229 }
230 
231 inline bool DDetectorMatches::Get_SCMatchParams(const DTrackingData* locTrack, vector<shared_ptr<const DSCHitMatchParams> >& locMatchParams) const
232 {
233  locMatchParams.clear();
234  auto locIterator = dTrackSCMatchParams.find(locTrack);
235  if(locIterator == dTrackSCMatchParams.end())
236  return false;
237  locMatchParams = locIterator->second;
238  return true;
239 }
240 
241 inline bool DDetectorMatches::Get_DIRCMatchParams(const DTrackingData* locTrack, shared_ptr<const DDIRCMatchParams>& locMatchParams) const
242 {
243  auto locIterator = dTrackDIRCMatchParams.find(locTrack);
244  if(locIterator == dTrackDIRCMatchParams.end())
245  return false;
246  locMatchParams = locIterator->second;
247  return true;
248 }
249 
250 inline bool DDetectorMatches::Get_IsMatchedToTrack(const DBCALShower* locBCALShower) const
251 {
252  return (dBCALTrackMatchParams.find(locBCALShower) != dBCALTrackMatchParams.end());
253 }
254 
255 inline bool DDetectorMatches::Get_IsMatchedToTrack(const DFCALShower* locFCALShower) const
256 {
257  return (dFCALTrackMatchParams.find(locFCALShower) != dFCALTrackMatchParams.end());
258 }
259 
260 inline bool DDetectorMatches::Get_IsMatchedToHit(const DTrackingData* locTrack) const
261 {
262  if(dTrackBCALMatchParams.find(locTrack) != dTrackBCALMatchParams.end())
263  return true;
264  if(dTrackFCALMatchParams.find(locTrack) != dTrackFCALMatchParams.end())
265  return true;
266  if(dTrackTOFMatchParams.find(locTrack) != dTrackTOFMatchParams.end())
267  return true;
268  if(dTrackSCMatchParams.find(locTrack) != dTrackSCMatchParams.end())
269  return true;
270  return false;
271 }
272 
273 inline bool DDetectorMatches::Get_IsMatchedToDetector(const DTrackingData* locTrack, DetectorSystem_t locDetectorSystem) const
274 {
275  if(locDetectorSystem == SYS_BCAL)
276  return (dTrackBCALMatchParams.find(locTrack) != dTrackBCALMatchParams.end());
277  else if(locDetectorSystem == SYS_FCAL)
278  return (dTrackFCALMatchParams.find(locTrack) != dTrackFCALMatchParams.end());
279  else if(locDetectorSystem == SYS_TOF)
280  return (dTrackTOFMatchParams.find(locTrack) != dTrackTOFMatchParams.end());
281  else if(locDetectorSystem == SYS_START)
282  return (dTrackSCMatchParams.find(locTrack) != dTrackSCMatchParams.end());
283  else
284  return false;
285 }
286 
287 inline bool DDetectorMatches::Get_TrackMatchParams(const DBCALShower* locBCALShower, vector<shared_ptr<const DBCALShowerMatchParams> >& locMatchParams) const
288 {
289  locMatchParams.clear();
290  auto locIterator = dBCALTrackMatchParams.find(locBCALShower);
291  if(locIterator == dBCALTrackMatchParams.end())
292  return false;
293  locMatchParams = locIterator->second;
294  return true;
295 }
296 
297 inline bool DDetectorMatches::Get_TrackMatchParams(const DFCALShower* locFCALShower, vector<shared_ptr<const DFCALShowerMatchParams> >& locMatchParams) const
298 {
299  locMatchParams.clear();
300  auto locIterator = dFCALTrackMatchParams.find(locFCALShower);
301  if(locIterator == dFCALTrackMatchParams.end())
302  return false;
303  locMatchParams = locIterator->second;
304  return true;
305 }
306 
307 inline bool DDetectorMatches::Get_TrackMatchParams(const DTOFPoint* locTOFPoint, vector<shared_ptr<const DTOFHitMatchParams> >& locMatchParams) const
308 {
309  locMatchParams.clear();
310  auto locIterator = dTOFTrackMatchParams.find(locTOFPoint);
311  if(locIterator == dTOFTrackMatchParams.end())
312  return false;
313  locMatchParams = locIterator->second;
314  return true;
315 }
316 
317 inline bool DDetectorMatches::Get_TrackMatchParams(const DSCHit* locSCHit, vector<shared_ptr<const DSCHitMatchParams> >& locMatchParams) const
318 {
319  locMatchParams.clear();
320  auto locIterator = dSCTrackMatchParams.find(locSCHit);
321  if(locIterator == dSCTrackMatchParams.end())
322  return false;
323  locMatchParams = locIterator->second;
324  return true;
325 }
326 
327 inline bool DDetectorMatches::Get_DIRCTrackMatchParamsMap(map<shared_ptr<const DDIRCMatchParams>, vector<const DDIRCPmtHit*> >& locDIRCTrackMatchParamsMap)
328 {
329  locDIRCTrackMatchParamsMap = dDIRCTrackMatchParams;
330  return true;
331 }
332 
333 inline bool DDetectorMatches::Get_DistanceToNearestTrack(const DBCALShower* locBCALShower, double& locDistance) const
334 {
335  double locDeltaPhi, locDeltaZ;
336  if(!Get_DistanceToNearestTrack(locBCALShower, locDeltaPhi, locDeltaZ))
337  return false;
338  double locRSq = locBCALShower->x*locBCALShower->x + locBCALShower->y*locBCALShower->y;
339  locDistance = sqrt(locDeltaZ*locDeltaZ + locDeltaPhi*locDeltaPhi*locRSq);
340  return true;
341 }
342 
343 inline bool DDetectorMatches::Get_DistanceToNearestTrack(const DBCALShower* locBCALShower, double& locDeltaPhi, double& locDeltaZ) const
344 {
345  auto locIterator = dBCALShowerDistanceToNearestTrack.find(locBCALShower);
346  if(locIterator == dBCALShowerDistanceToNearestTrack.end())
347  return false;
348  locDeltaPhi = locIterator->second.first;
349  locDeltaZ = locIterator->second.second;
350  return true;
351 }
352 
353 inline bool DDetectorMatches::Get_DistanceToNearestTrack(const DFCALShower* locFCALShower, double& locDistance) const
354 {
355  auto locIterator = dFCALShowerDistanceToNearestTrack.find(locFCALShower);
356  if(locIterator == dFCALShowerDistanceToNearestTrack.end())
357  return false;
358  locDistance = locIterator->second;
359  return true;
360 }
361 
362 inline bool DDetectorMatches::Get_FlightTimePCorrelation(const DTrackingData* locTrack, DetectorSystem_t locDetectorSystem, double& locCorrelation) const
363 {
364  auto locTrackIterator = dFlightTimePCorrelations.find(locTrack);
365  if(locTrackIterator == dFlightTimePCorrelations.end())
366  return false;
367  const map<DetectorSystem_t, double>& locDetectorMap = locTrackIterator->second;
368  map<DetectorSystem_t, double>::const_iterator locDetectorIterator = locDetectorMap.find(locDetectorSystem);
369  if(locDetectorIterator == locDetectorMap.end())
370  return false;
371  locCorrelation = locDetectorIterator->second;
372  return true;
373 }
374 
375 //Get # Matches
377 {
378  auto locIterator = dTrackBCALMatchParams.begin();
379  unsigned int locNumTrackMatches = 0;
380  for(; locIterator != dTrackBCALMatchParams.end(); ++locIterator)
381  locNumTrackMatches += locIterator->second.size();
382  return locNumTrackMatches;
383 }
384 
386 {
387  auto locIterator = dTrackFCALMatchParams.begin();
388  unsigned int locNumTrackMatches = 0;
389  for(; locIterator != dTrackFCALMatchParams.end(); ++locIterator)
390  locNumTrackMatches += locIterator->second.size();
391  return locNumTrackMatches;
392 }
393 
395 {
396  auto locIterator = dTrackTOFMatchParams.begin();
397  unsigned int locNumTrackMatches = 0;
398  for(; locIterator != dTrackTOFMatchParams.end(); ++locIterator)
399  locNumTrackMatches += locIterator->second.size();
400  return locNumTrackMatches;
401 }
402 
404 {
405  auto locIterator = dTrackSCMatchParams.begin();
406  unsigned int locNumTrackMatches = 0;
407  for(; locIterator != dTrackSCMatchParams.end(); ++locIterator)
408  locNumTrackMatches += locIterator->second.size();
409  return locNumTrackMatches;
410 }
411 
413 {
414  return dTrackDIRCMatchParams.size();
415 }
416 
417 //SETTERS:
418 inline void DDetectorMatches::Add_Match(const DTrackingData* locTrack, const DBCALShower* locBCALShower, const shared_ptr<const DBCALShowerMatchParams>& locShowerMatchParams)
419 {
420  dTrackBCALMatchParams[locTrack].push_back(locShowerMatchParams);
421  dBCALTrackMatchParams[locBCALShower].push_back(locShowerMatchParams);
422 }
423 inline void DDetectorMatches::Add_Match(const DTrackingData* locTrack, const DFCALShower* locFCALShower, const shared_ptr<const DFCALShowerMatchParams>& locShowerMatchParams)
424 {
425  dTrackFCALMatchParams[locTrack].push_back(locShowerMatchParams);
426  dFCALTrackMatchParams[locFCALShower].push_back(locShowerMatchParams);
427 }
428 inline void DDetectorMatches::Add_Match(const DTrackingData* locTrack, const DTOFPoint* locTOFPoint, const shared_ptr<const DTOFHitMatchParams>& locHitMatchParams)
429 {
430  dTrackTOFMatchParams[locTrack].push_back(locHitMatchParams);
431  dTOFTrackMatchParams[locTOFPoint].push_back(locHitMatchParams);
432 }
433 inline void DDetectorMatches::Add_Match(const DTrackingData* locTrack, const DSCHit* locSCHit, const shared_ptr<const DSCHitMatchParams>& locHitMatchParams)
434 {
435  dTrackSCMatchParams[locTrack].push_back(locHitMatchParams);
436  dSCTrackMatchParams[locSCHit].push_back(locHitMatchParams);
437 }
438 inline void DDetectorMatches::Add_Match(const DTrackingData* locTrack, const shared_ptr<const DDIRCMatchParams>& locHitMatchParams)
439 {
440  dTrackDIRCMatchParams[locTrack] = locHitMatchParams;
441 }
442 inline void DDetectorMatches::Set_DistanceToNearestTrack(const DBCALShower* locBCALShower, double locDeltaPhi, double locDeltaZ)
443 {
444  dBCALShowerDistanceToNearestTrack[locBCALShower] = pair<double, double>(locDeltaPhi, locDeltaZ);
445 }
446 inline void DDetectorMatches::Set_DistanceToNearestTrack(const DFCALShower* locFCALShower, double locDistanceToNearestTrack)
447 {
448  dFCALShowerDistanceToNearestTrack[locFCALShower] = locDistanceToNearestTrack;
449 }
450 inline void DDetectorMatches::Set_FlightTimePCorrelation(const DTrackingData* locTrack, DetectorSystem_t locDetectorSystem, double locCorrelation)
451 {
452  dFlightTimePCorrelations[locTrack][locDetectorSystem] = locCorrelation;
453 }
454 
455 #endif // _DDetectorMatches_
map< const DTrackingData *, vector< shared_ptr< const DTOFHitMatchParams > > > dTrackTOFMatchParams
bool Get_DistanceToNearestTrack(const DBCALShower *locBCALShower, double &locDistance) const
void toStrings(vector< pair< string, string > > &items) const
bool Get_TOFMatchParams(const DTrackingData *locTrack, vector< shared_ptr< const DTOFHitMatchParams > > &locMatchParams) const
bool Get_DIRCTrackMatchParamsMap(map< shared_ptr< const DDIRCMatchParams >, vector< const DDIRCPmtHit * > > &locDIRCTrackMatchParamsMap)
bool Get_SCMatchParams(const DTrackingData *locTrack, vector< shared_ptr< const DSCHitMatchParams > > &locMatchParams) const
map< const DTrackingData *, vector< shared_ptr< const DBCALShowerMatchParams > > > dTrackBCALMatchParams
TVector3 DVector3
Definition: DVector3.h:14
bool Get_FCALMatchParams(const DTrackingData *locTrack, vector< shared_ptr< const DFCALShowerMatchParams > > &locMatchParams) const
map< const DSCHit *, vector< shared_ptr< const DSCHitMatchParams > > > dSCTrackMatchParams
map< const DTOFPoint *, vector< shared_ptr< const DTOFHitMatchParams > > > dTOFTrackMatchParams
size_t Get_NumTrackFCALMatches(void) const
size_t Get_NumTrackSCMatches(void) const
DetectorSystem_t
Definition: GlueX.h:15
map< shared_ptr< const DDIRCMatchParams >, vector< const DDIRCPmtHit * > > dDIRCTrackMatchParams
map< const DTrackingData *, shared_ptr< const DDIRCMatchParams > > dTrackDIRCMatchParams
Definition: GlueX.h:19
void Add_Match(const DTrackingData *locTrack, const DBCALShower *locBCALShower, const shared_ptr< const DBCALShowerMatchParams > &locShowerMatchParams)
Definition: DSCHit.h:14
map< const DFCALShower *, vector< shared_ptr< const DFCALShowerMatchParams > > > dFCALTrackMatchParams
map< const DTrackingData *, vector< shared_ptr< const DSCHitMatchParams > > > dTrackSCMatchParams
Definition: GlueX.h:20
void Set_DistanceToNearestTrack(const DBCALShower *locBCALShower, double locDeltaPhi, double locDeltaZ)
Definition: GlueX.h:22
bool Get_FlightTimePCorrelation(const DTrackingData *locTrack, DetectorSystem_t locDetectorSystem, double &locCorrelation) const
map< const DTrackingData *, vector< shared_ptr< const DFCALShowerMatchParams > > > dTrackFCALMatchParams
bool Get_IsMatchedToHit(const DTrackingData *locTrack) const
const DFCALShower * dFCALShower
map< const DBCALShower *, vector< shared_ptr< const DBCALShowerMatchParams > > > dBCALTrackMatchParams
bool Get_DIRCMatchParams(const DTrackingData *locTrack, shared_ptr< const DDIRCMatchParams > &locMatchParams) const
double sqrt(double)
const DTOFPoint * dTOFPoint
double Get_DistanceToTrack(void) const
bool Get_BCALMatchParams(const DTrackingData *locTrack, vector< shared_ptr< const DBCALShowerMatchParams > > &locMatchParams) const
size_t Get_NumTrackBCALMatches(void) const
size_t Get_NumTrackTOFMatches(void) const
double Get_DistanceToTrack(void) const
const DSCHit * dSCHit
map< const DBCALShower *, pair< double, double > > dBCALShowerDistanceToNearestTrack
map< const DFCALShower *, double > dFCALShowerDistanceToNearestTrack
bool Get_TrackMatchParams(const DBCALShower *locBCALShower, vector< shared_ptr< const DBCALShowerMatchParams > > &locMatchParams) const
size_t Get_NumTrackDIRCMatches(void) const
void Set_FlightTimePCorrelation(const DTrackingData *locTrack, DetectorSystem_t locDetectorSystem, double locCorrelation)
bool Get_IsMatchedToDetector(const DTrackingData *locTrack, DetectorSystem_t locDetectorSystem) const
const DBCALShower * dBCALShower
map< const DTrackingData *, map< DetectorSystem_t, double > > dFlightTimePCorrelations
bool Get_IsMatchedToTrack(const DBCALShower *locBCALShower) const