CMS 3D CMS Logo

CachedTrajectory.h
Go to the documentation of this file.
1 #ifndef TrackAssociator_CachedTrajectory_h
2 #define TrackAssociator_CachedTrajectory_h 1
3 // -*- C++ -*-
4 //
5 // Package: TrackAssociator
6 // Class: CachedTrajectory
7 //
8 /*
9 
10  Description: CachedTrajectory is a transient class, which stores a set of
11  * trajectory states that can be used as starting points when there is need
12  * propagate the same track to a number of different surfaces, which might
13  * not be know in advance.
14 
15  Implementation:
16  <Notes on implementation>
17 */
18 //
19 // Original Author: Dmytro Kovalskyi
20 // Created: Fri Apr 21 10:59:41 PDT 2006
21 //
22 //
23 
31 #include <deque>
33 
34 std::vector<SteppingHelixStateInfo> propagateThoughFromIP(const SteppingHelixStateInfo& state,
35  const Propagator* prop,
36  const FiducialVolume& volume,
37  int nsteps,
38  float step,
39  float minR,
40  float minZ,
41  float maxR,
42  float maxZ);
43 
45 public:
46  const std::vector<SteppingHelixStateInfo>& getEcalTrajectory() const;
47  const std::vector<SteppingHelixStateInfo>& getHcalTrajectory() const;
48  const std::vector<SteppingHelixStateInfo>& getHOTrajectory() const;
49  const std::vector<SteppingHelixStateInfo>& getPreshowerTrajectory() const;
50 
51 private:
53  friend std::vector<SteppingHelixStateInfo> propagateThoughFromIP(const SteppingHelixStateInfo& state,
54  const Propagator* ptr,
55  const FiducialVolume& volume,
56  int nsteps,
57  float step,
58  float minR,
59  float minZ,
60  float maxR,
61  float maxZ);
62 
66 
68 
71 
75 
78 
81  std::pair<float, float> trajectoryDelta(TrajectorType) dso_internal;
82 
85 
89  void getTrajectory(std::vector<SteppingHelixStateInfo>&, const FiducialVolume&, int steps = 4) dso_internal;
90 
95 
98 
103 
104  //get the innermost state of the whole trajectory
106  //get the outermost state of the whole trajectory
108 
109  // specify the detector global boundaries to limit the propagator
110  // units: cm
111  // HINT: use lower bounds to limit propagateAll() action within
112  // smaller region, such as ECAL for example
113  void setMaxDetectorRadius(float r = 800.) dso_internal { maxRho_ = r; }
114  void setMaxDetectorLength(float l = 2200.) dso_internal { maxZ_ = l / 2.; }
115  void setMaxHORadius(float r = 800.) dso_internal { HOmaxRho_ = r; }
116  void setMaxHOLength(float l = 2200.) dso_internal { HOmaxZ_ = l / 2.; }
117  void setMinDetectorRadius(float r = 0.) dso_internal { minRho_ = r; }
118  void setMinDetectorLength(float l = 0.) dso_internal { minZ_ = l / 2.; }
119 
120  void setPropagationStep(float s = 20.) { step_ = s; }
122 
123 protected:
124  static int sign(float number) dso_internal {
125  if (number == 0)
126  return 0;
127  if (number > 0)
128  return 1;
129  else
130  return -1;
131  }
132 
133  std::pair<float, float> delta(const double& theta1, const double& theta2, const double& phi1, const double& phi2)
134  dso_internal;
135 
136  float distance(const Plane* plane, int index) dso_internal {
137  if (index < 0 || fullTrajectory_.empty() || (unsigned int)index >= fullTrajectory_.size())
138  return 0;
139  return plane->localZ(fullTrajectory_[index].position());
140  }
141 
142  std::deque<SteppingHelixStateInfo> fullTrajectory_;
143  std::vector<SteppingHelixStateInfo> ecalTrajectory_;
144  std::vector<SteppingHelixStateInfo> hcalTrajectory_;
145  std::vector<SteppingHelixStateInfo> hoTrajectory_;
146  std::vector<SteppingHelixStateInfo> preshowerTrajectory_;
147  std::vector<GlobalPoint> wideEcalTrajectory_;
148  std::vector<GlobalPoint> wideHcalTrajectory_;
149  std::vector<GlobalPoint> wideHOTrajectory_;
151 
153 
155 
156  float maxRho_;
157  float maxZ_;
158  float HOmaxRho_;
159  float HOmaxZ_;
160  float minRho_;
161  float minZ_;
162  float step_;
163 };
164 #endif
Visibility.h
CachedTrajectory::HOmaxZ_
float HOmaxZ_
Definition: CachedTrajectory.h:159
HLT_2018_cff.minR
minR
Definition: HLT_2018_cff.py:83154
step
step
Definition: StallMonitor.cc:94
CachedTrajectory::getPropagationStep
float getPropagationStep() const
Definition: CachedTrajectory.h:121
CachedTrajectory::setMaxDetectorRadius
void setMaxDetectorRadius(float r=800.)
Definition: CachedTrajectory.h:113
CachedTrajectory::setMinDetectorLength
void setMinDetectorLength(float l=0.)
Definition: CachedTrajectory.h:118
CachedTrajectory::wideHOTrajectory_
std::vector< GlobalPoint > wideHOTrajectory_
Definition: CachedTrajectory.h:149
CachedTrajectory::HO
Definition: CachedTrajectory.h:65
CachedTrajectory::setMinDetectorRadius
void setMinDetectorRadius(float r=0.)
Definition: CachedTrajectory.h:117
CachedTrajectory::findPreshowerTrajectory
void findPreshowerTrajectory(const FiducialVolume &)
Definition: CachedTrajectory.cc:449
CachedTrajectory::FullTrajectory
Definition: CachedTrajectory.h:64
CachedTrajectory::maxRho_
float maxRho_
Definition: CachedTrajectory.h:156
CachedTrajectory::getTrajectory
void getTrajectory(std::vector< SteppingHelixStateInfo > &, const FiducialVolume &, int steps=4)
Definition: CachedTrajectory.cc:334
CachedTrajectory::getOuterState
SteppingHelixStateInfo getOuterState()
Definition: CachedTrajectory.cc:605
watchdog.const
const
Definition: watchdog.py:83
CachedTrajectory::IpToEcal
Definition: CachedTrajectory.h:64
CachedTrajectory::setPropagationStep
void setPropagationStep(float s=20.)
Definition: CachedTrajectory.h:120
CachedTrajectory::setMaxDetectorLength
void setMaxDetectorLength(float l=2200.)
Definition: CachedTrajectory.h:114
CachedTrajectory::findHcalTrajectory
void findHcalTrajectory(const FiducialVolume &)
Definition: CachedTrajectory.cc:461
CosmicsPD_Skims.maxZ
maxZ
Definition: CosmicsPD_Skims.py:136
CachedTrajectory::CachedTrajectory
CachedTrajectory()
Definition: CachedTrajectory.cc:49
CachedTrajectory::minRho_
float minRho_
Definition: CachedTrajectory.h:160
CachedTrajectory::setMaxHOLength
void setMaxHOLength(float l=2200.)
Definition: CachedTrajectory.h:116
Propagator
Definition: Propagator.h:44
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CachedTrajectory::WideTrajectoryType
WideTrajectoryType
Definition: CachedTrajectory.h:65
CachedTrajectory::getInnerState
SteppingHelixStateInfo getInnerState()
Definition: CachedTrajectory.cc:598
CachedTrajectory::getStateAtHO
SteppingHelixStateInfo getStateAtHO()
Definition: CachedTrajectory.cc:591
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
FiducialVolume.h
CachedTrajectory::propagateAll
bool propagateAll(const SteppingHelixStateInfo &initialState)
propagate through the whole detector, returns true if successful
Definition: CachedTrajectory.cc:115
CachedTrajectory::setPropagator
void setPropagator(const Propagator *ptr)
Definition: CachedTrajectory.h:83
CachedTrajectory::propagate
void propagate(SteppingHelixStateInfo &state, const Plane &plane)
Definition: CachedTrajectory.cc:77
Point3DBase< float, GlobalTag >
CachedTrajectory::findHOTrajectory
void findHOTrajectory(const FiducialVolume &)
Definition: CachedTrajectory.cc:469
CachedTrajectory::propagator_
const Propagator * propagator_
Definition: CachedTrajectory.h:154
SteppingHelixStateInfo
Definition: SteppingHelixStateInfo.h:27
CachedTrajectory::TrajectorType
TrajectorType
Definition: CachedTrajectory.h:64
CachedTrajectory::getStateAtEcal
SteppingHelixStateInfo getStateAtEcal()
Definition: CachedTrajectory.cc:570
CachedTrajectory::wideHcalTrajectory_
std::vector< GlobalPoint > wideHcalTrajectory_
Definition: CachedTrajectory.h:148
CachedTrajectory::getWideTrajectory
std::vector< GlobalPoint > * getWideTrajectory(const std::vector< SteppingHelixStateInfo > &, WideTrajectoryType)
Definition: CachedTrajectory.cc:477
CachedTrajectory::fullTrajectory_
std::deque< SteppingHelixStateInfo > fullTrajectory_
Definition: CachedTrajectory.h:142
CachedTrajectory::sign
static int sign(float number)
Definition: CachedTrajectory.h:124
CachedTrajectory::trajectoryDelta
std::pair< float, float > trajectoryDelta(TrajectorType)
Definition: CachedTrajectory.cc:256
dso_internal
#define dso_internal
Definition: Visibility.h:13
TrackDetectorAssociator
Definition: TrackDetectorAssociator.h:49
CachedTrajectory::IpToHO
Definition: CachedTrajectory.h:64
CachedTrajectory::maxZ_
float maxZ_
Definition: CachedTrajectory.h:157
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
CachedTrajectory::wideEcalTrajectory_
std::vector< GlobalPoint > wideEcalTrajectory_
Definition: CachedTrajectory.h:147
createfilelist.int
int
Definition: createfilelist.py:10
CachedTrajectory::setMaxHORadius
void setMaxHORadius(float r=800.)
Definition: CachedTrajectory.h:115
CachedTrajectory::hoTrajectory_
std::vector< SteppingHelixStateInfo > hoTrajectory_
Definition: CachedTrajectory.h:145
FiducialVolume
Definition: FiducialVolume.h:25
propagateThoughFromIP
std::vector< SteppingHelixStateInfo > propagateThoughFromIP(const SteppingHelixStateInfo &state, const Propagator *prop, const FiducialVolume &volume, int nsteps, float step, float minR, float minZ, float maxR, float maxZ)
Definition: CachedTrajectory.cc:18
CachedTrajectory
Definition: CachedTrajectory.h:44
CachedTrajectory::minZ_
float minZ_
Definition: CachedTrajectory.h:161
CachedTrajectory::delta
std::pair< float, float > delta(const double &theta1, const double &theta2, const double &phi1, const double &phi2)
Definition: CachedTrajectory.cc:319
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
CachedTrajectory::getStateAtPreshower
SteppingHelixStateInfo getStateAtPreshower()
Definition: CachedTrajectory.cc:577
CachedTrajectory::Ecal
Definition: CachedTrajectory.h:65
alignCSCRings.r
r
Definition: alignCSCRings.py:93
GeomDet.h
SteppingHelixStateInfo.h
std
Definition: JetResolutionObject.h:76
CachedTrajectory::propagateForward
void propagateForward(SteppingHelixStateInfo &state, float distance)
Definition: CachedTrajectory.cc:58
TAMuonChamberMatch.h
CachedTrajectory::getPreshowerTrajectory
const std::vector< SteppingHelixStateInfo > & getPreshowerTrajectory() const
Definition: CachedTrajectory.cc:457
CachedTrajectory::IpToHcal
Definition: CachedTrajectory.h:64
DetId.h
CachedTrajectory::fullTrajectoryFilled_
bool fullTrajectoryFilled_
Definition: CachedTrajectory.h:152
DetIdAssociator.h
CachedTrajectory::setStateAtIP
void setStateAtIP(const SteppingHelixStateInfo &state)
Definition: CachedTrajectory.h:84
CachedTrajectory::step_
float step_
Definition: CachedTrajectory.h:162
Plane
Definition: Plane.h:16
CachedTrajectory::getStateAtHcal
SteppingHelixStateInfo getStateAtHcal()
Definition: CachedTrajectory.cc:584
CachedTrajectory::preshowerTrajectory_
std::vector< SteppingHelixStateInfo > preshowerTrajectory_
Definition: CachedTrajectory.h:146
CachedTrajectory::stateAtIP_
SteppingHelixStateInfo stateAtIP_
Definition: CachedTrajectory.h:150
CachedTrajectory::distance
float distance(const Plane *plane, int index)
Definition: CachedTrajectory.h:136
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
customisers.steps
steps
Definition: customisers.py:41
CachedTrajectory::getHOTrajectory
const std::vector< SteppingHelixStateInfo > & getHOTrajectory() const
Definition: CachedTrajectory.cc:475
CachedTrajectory::ecalTrajectory_
std::vector< SteppingHelixStateInfo > ecalTrajectory_
Definition: CachedTrajectory.h:143
Cylinder
Definition: Cylinder.h:19
CachedTrajectory::getHcalTrajectory
const std::vector< SteppingHelixStateInfo > & getHcalTrajectory() const
Definition: CachedTrajectory.cc:467
CachedTrajectory::getEcalTrajectory
const std::vector< SteppingHelixStateInfo > & getEcalTrajectory() const
Definition: CachedTrajectory.cc:455
GlobalTrackingGeometry.h
CachedTrajectory::propagateThoughFromIP
friend std::vector< SteppingHelixStateInfo > propagateThoughFromIP(const SteppingHelixStateInfo &state, const Propagator *ptr, const FiducialVolume &volume, int nsteps, float step, float minR, float minZ, float maxR, float maxZ)
Definition: CachedTrajectory.cc:18
CachedTrajectory::reset_trajectory
void reset_trajectory()
Definition: CachedTrajectory.cc:431
CachedTrajectory::hcalTrajectory_
std::vector< SteppingHelixStateInfo > hcalTrajectory_
Definition: CachedTrajectory.h:144
CachedTrajectory::HOmaxRho_
float HOmaxRho_
Definition: CachedTrajectory.h:158
CosmicGenFilterHelix_cff.minZ
minZ
i.e.
Definition: CosmicGenFilterHelix_cff.py:9
CachedTrajectory::Hcal
Definition: CachedTrajectory.h:65
CachedTrajectory::findEcalTrajectory
void findEcalTrajectory(const FiducialVolume &)
Definition: CachedTrajectory.cc:443