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 
64  typedef ROOT::Math::AxisAngle Rotation;
65 
68 
70  TrajectoryManager(FSimEvent* aSimEvent,
71  const edm::ParameterSet& matEff,
73  const edm::ParameterSet& decays);
74 
77 
79  void reconstruct(const TrackerTopology *tTopo, RandomEngineAndDistribution const*);
80 
82  void createPSimHits(const TrackerLayer& layer,
83  const ParticlePropagator& P_before,
84  std::map<double,PSimHit>& theHitMap,
85  int trackID, int partID, const TrackerTopology *tTopo);
86 
88  void propagateToCalorimeters(ParticlePropagator& PP,
89  int fsimi,
91 
94  bool propagateToLayer(ParticlePropagator& PP,unsigned layer);
95 
97  const TrackerInteractionGeometry* theGeometry();
98 
100  void initializeRecoGeometry(const GeometricSearchTracker* geomSearchTracker,
101  const TrackerInteractionGeometry* interactionGeometry,
102  const MagneticFieldMap* aFieldMap);
103 
105  void initializeTrackerGeometry(const TrackerGeometry* geomTracker);
106 
107  // load container from edm::Event
108  void loadSimHits(edm::PSimHitContainer & c) const;
109 
110  private:
111 
113  void updateWithDaughters(ParticlePropagator& PP, int fsimi, RandomEngineAndDistribution const*);
114 
116  void moveAllDaughters(int fsimi, const Rotation& r, double rescale);
117 
119  void initializeLayerMap();
120 
122  TrajectoryStateOnSurface makeTrajectoryState( const DetLayer* layer,
123  const ParticlePropagator& pp,
124  const MagneticField* field) const;
125 
127  void makePSimHits( const GeomDet* det, const TrajectoryStateOnSurface& ts,
128  std::map<double,PSimHit>& theHitMap,
129  int tkID, float el, float thick, int pID, const TrackerTopology *tTopo);
131  std::pair<double,PSimHit> makeSinglePSimHit( const GeomDetUnit& det,
132  const TrajectoryStateOnSurface& ts,
133  int tkID, float el, float thick, int pID, const TrackerTopology *tTopo) const;
134 
136  const DetLayer* detLayer( const TrackerLayer& layer, float zpos) const;
137 
138  private:
139 
141 
144 
146 
149  double distCut;
150 
151  double pTmin;
152  bool firstLoop;
153  std::map<unsigned,std::map<double,PSimHit> > thePSimHits;
154 
157  std::vector<const DetLayer*> theLayerMap;
159 
160  // Histos* myHistos;
161 
163 
164 };
165 #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