CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
90 
93  bool propagateToLayer(ParticlePropagator& PP, unsigned layer);
94 
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:
112 
114  void moveAllDaughters(int fsimi, const Rotation& r, double rescale);
115 
117  void initializeLayerMap();
118 
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
void reconstruct(const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
Does the real job.
void initializeLayerMap()
Initialize correspondence map between Famos interaction geometry and tracker reco geometry...
void initializeTrackerGeometry(const TrackerGeometry *geomTracker)
Initialize the full Tracker Geometry.
void propagateToCalorimeters(ParticlePropagator &PP, int fsimi, RandomEngineAndDistribution const *)
Propagate the particle through the calorimeters.
PythiaDecays * myDecayEngine
void makePSimHits(const GeomDet *det, const TrajectoryStateOnSurface &ts, std::map< double, PSimHit > &theHitMap, int tkID, float el, float thick, int pID, const TrackerTopology *tTopo)
and there
void createPSimHits(const TrackerLayer &layer, const ParticlePropagator &P_before, std::map< double, PSimHit > &theHitMap, int trackID, int partID, const TrackerTopology *tTopo)
Create a vector of PSimHits.
const MagneticFieldMap * _theFieldMap
const DetLayer * detLayer(const TrackerLayer &layer, float zpos) const
Returns the DetLayer pointer corresponding to the FAMOS layer.
const TrackerGeometry * theGeomTracker
void initializeRecoGeometry(const GeometricSearchTracker *geomSearchTracker, const TrackerInteractionGeometry *interactionGeometry, const MagneticFieldMap *aFieldMap)
Initialize the Reconstruction Geometry.
void moveAllDaughters(int fsimi, const Rotation &r, double rescale)
Move, rescale and rotate all daughters after propagation, material effects and decay of the mother...
const GeometricSearchTracker * theGeomSearchTracker
ROOT::Math::AxisAngle Rotation
~TrajectoryManager()
Default Destructor.
const TrackerInteractionGeometry * _theGeometry
MaterialEffects * theMaterialEffects
std::pair< double, PSimHit > makeSinglePSimHit(const GeomDetUnit &det, const TrajectoryStateOnSurface &ts, int tkID, float el, float thick, int pID, const TrackerTopology *tTopo) const
and there
TrajectoryManager()
Default Constructor.
std::map< unsigned, std::map< double, PSimHit > > thePSimHits
TrajectoryStateOnSurface makeTrajectoryState(const DetLayer *layer, const ParticlePropagator &pp, const MagneticField *field) const
Teddy, you must put comments there.
const TrackerInteractionGeometry * theGeometry()
Returns the pointer to geometry.
std::vector< const DetLayer * > theLayerMap
HLT enums.
void loadSimHits(edm::PSimHitContainer &c) const
bool propagateToLayer(ParticlePropagator &PP, unsigned layer)
std::vector< PSimHit > PSimHitContainer
void updateWithDaughters(ParticlePropagator &PP, int fsimi, RandomEngineAndDistribution const *)
Decay the particle and update the SimEvent with daughters.