CMS 3D CMS Logo

TrajectoryManager.h
Go to the documentation of this file.
1 #ifndef TRAJECTORYMANAGER_H
2 #define TRAJECTORYMANAGER_H
3 
4 //DataFormats
8 
9 //FAMOS Headers
11 
12 #include "Math/GenVector/AxisAngle.h"
13 
37 #include <vector>
38 #include <map>
39 
40 class PythiaDecays;
42 class TrackerLayer;
43 class ParticlePropagator;
44 class FSimEvent;
45 //class Histos;
48 class DetLayer;
49 class MagneticField;
50 class MagneticFieldMap;
52 class TrackerGeometry;
53 class TrackerTopology;
54 
55 namespace edm {
56  class ParameterSet;
57 }
58 
60 
61 {
62 public:
63  typedef ROOT::Math::AxisAngle Rotation;
64 
67 
69  TrajectoryManager(FSimEvent* aSimEvent,
70  const edm::ParameterSet& matEff,
72  const edm::ParameterSet& decays);
73 
76 
78  void reconstruct(const TrackerTopology* tTopo, RandomEngineAndDistribution const*);
79 
81  void createPSimHits(const TrackerLayer& layer,
82  const ParticlePropagator& P_before,
83  std::map<double, PSimHit>& theHitMap,
84  int trackID,
85  int partID,
86  const TrackerTopology* tTopo);
87 
89  void propagateToCalorimeters(ParticlePropagator& PP, int fsimi, RandomEngineAndDistribution const*);
90 
93  bool propagateToLayer(ParticlePropagator& PP, unsigned layer);
94 
96  const TrackerInteractionGeometry* theGeometry();
97 
99  void initializeRecoGeometry(const GeometricSearchTracker* geomSearchTracker,
100  const TrackerInteractionGeometry* interactionGeometry,
101  const MagneticFieldMap* aFieldMap);
102 
104  void initializeTrackerGeometry(const TrackerGeometry* geomTracker);
105 
106  // load container from edm::Event
107  void loadSimHits(edm::PSimHitContainer& c) const;
108 
109 private:
111  void updateWithDaughters(ParticlePropagator& PP, int fsimi, RandomEngineAndDistribution const*);
112 
114  void moveAllDaughters(int fsimi, const Rotation& r, double rescale);
115 
117  void initializeLayerMap();
118 
120  TrajectoryStateOnSurface makeTrajectoryState(const DetLayer* layer,
121  const ParticlePropagator& pp,
122  const MagneticField* field) const;
123 
125  void makePSimHits(const GeomDet* det,
126  const TrajectoryStateOnSurface& ts,
127  std::map<double, PSimHit>& theHitMap,
128  int tkID,
129  float el,
130  float thick,
131  int pID,
132  const TrackerTopology* tTopo);
134  std::pair<double, PSimHit> makeSinglePSimHit(const GeomDetUnit& det,
135  const TrajectoryStateOnSurface& ts,
136  int tkID,
137  float el,
138  float thick,
139  int pID,
140  const TrackerTopology* tTopo) const;
141 
143  const DetLayer* detLayer(const TrackerLayer& layer, float zpos) const;
144 
145 private:
147 
150 
152 
155  double distCut;
156 
157  double pTmin;
158  bool firstLoop;
159  std::map<unsigned, std::map<double, PSimHit> > thePSimHits;
160 
163  std::vector<const DetLayer*> theLayerMap;
165 
166  // Histos* myHistos;
167 
169 };
170 #endif
PythiaDecays * myDecayEngine
const MagneticFieldMap * _theFieldMap
const TrackerGeometry * theGeomTracker
const GeometricSearchTracker * theGeomSearchTracker
ROOT::Math::AxisAngle Rotation
const TrackerInteractionGeometry * _theGeometry
MaterialEffects * theMaterialEffects
TrajectoryManager()
Default Constructor.
std::map< unsigned, std::map< double, PSimHit > > thePSimHits
std::vector< const DetLayer * > theLayerMap
HLT enums.
std::vector< PSimHit > PSimHitContainer