CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectoryManager.h
Go to the documentation of this file.
1 #ifndef TRAJECTORYMANAGER_H
2 #define TRAJECTORYMANAGER_H
3 
4 //DataFormats
7 
8 //FAMOS Headers
10 
11 #include "Math/GenVector/AxisAngle.h"
12 
36 #include <vector>
37 #include <map>
38 
39 class PythiaDecays;
41 class TrackerLayer;
42 class ParticlePropagator;
43 class FSimEvent;
44 //class Histos;
45 class RandomEngine;
47 class DetLayer;
48 class GeomDet;
49 class GeomDetUnit;
50 class MagneticField;
51 class MagneticFieldMap;
53 class TrackerGeometry;
54 class TrackerTopology;
55 
56 namespace edm {
57  class ParameterSet;
58 }
59 
61 
62 {
63  public:
64 
65  typedef ROOT::Math::AxisAngle Rotation;
66 
69 
71  TrajectoryManager(FSimEvent* aSimEvent,
72  const edm::ParameterSet& matEff,
74  const edm::ParameterSet& decays,
75  const RandomEngine* engine);
76 
79 
81  void reconstruct(const TrackerTopology *tTopo);
82 
84  void createPSimHits(const TrackerLayer& layer,
85  const ParticlePropagator& P_before,
86  std::map<double,PSimHit>& theHitMap,
87  int trackID, int partID, const TrackerTopology *tTopo);
88 
91  int fsimi);
92 
93 
96  bool propagateToLayer(ParticlePropagator& PP,unsigned layer);
97 
100 
102  void initializeRecoGeometry(const GeometricSearchTracker* geomSearchTracker,
103  const TrackerInteractionGeometry* interactionGeometry,
104  const MagneticFieldMap* aFieldMap);
105 
107  void initializeTrackerGeometry(const TrackerGeometry* geomTracker);
108 
109  // load container from edm::Event
110  void loadSimHits(edm::PSimHitContainer & c) const;
111 
112  private:
113 
115  void updateWithDaughters(ParticlePropagator& PP, int fsimi);
116 
118  void moveAllDaughters(int fsimi, const Rotation& r, double rescale);
119 
121  void initializeLayerMap();
122 
125  const ParticlePropagator& pp,
126  const MagneticField* field) const;
127 
129  void makePSimHits( const GeomDet* det, const TrajectoryStateOnSurface& ts,
130  std::map<double,PSimHit>& theHitMap,
131  int tkID, float el, float thick, int pID, const TrackerTopology *tTopo);
133  std::pair<double,PSimHit> makeSinglePSimHit( const GeomDetUnit& det,
134  const TrajectoryStateOnSurface& ts,
135  int tkID, float el, float thick, int pID, const TrackerTopology *tTopo) const;
136 
138  const DetLayer* detLayer( const TrackerLayer& layer, float zpos) const;
139 
140  private:
141 
143 
146 
148 
151  double distCut;
152 
153  double pTmin;
154  bool firstLoop;
155  std::map<unsigned,std::map<double,PSimHit> > thePSimHits;
156 
159  std::vector<const DetLayer*> theLayerMap;
161 
162  // Histos* myHistos;
163 
165 
167 
168 };
169 #endif
void initializeLayerMap()
Initialize correspondence map between Famos interaction geometry and tracker reco geometry...
const DetLayer * detLayer(const TrackerLayer &layer, float zpos) const
Returns the DetLayer pointer corresponding to the FAMOS layer.
void initializeTrackerGeometry(const TrackerGeometry *geomTracker)
Initialize the full Tracker Geometry.
PythiaDecays * myDecayEngine
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
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
tuple pp
Definition: createTree.py:15
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 TrackerGeometry * theGeomTracker
void initializeRecoGeometry(const GeometricSearchTracker *geomSearchTracker, const TrackerInteractionGeometry *interactionGeometry, const MagneticFieldMap *aFieldMap)
Initialize the Reconstruction Geometry.
TrajectoryStateOnSurface makeTrajectoryState(const DetLayer *layer, const ParticlePropagator &pp, const MagneticField *field) const
Teddy, you must put comments there.
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
void reconstruct(const TrackerTopology *tTopo)
Does the real job.
~TrajectoryManager()
Default Destructor.
const RandomEngine * random
const TrackerInteractionGeometry * _theGeometry
MaterialEffects * theMaterialEffects
void updateWithDaughters(ParticlePropagator &PP, int fsimi)
Decay the particle and update the SimEvent with daughters.
TrajectoryManager()
Default Constructor.
void propagateToCalorimeters(ParticlePropagator &PP, int fsimi)
Propagate the particle through the calorimeters.
std::map< unsigned, std::map< double, PSimHit > > thePSimHits
void loadSimHits(edm::PSimHitContainer &c) const
tuple simHits
Definition: trackerHits.py:16
const TrackerInteractionGeometry * theGeometry()
Returns the pointer to geometry.
std::vector< const DetLayer * > theLayerMap
bool propagateToLayer(ParticlePropagator &PP, unsigned layer)
std::vector< PSimHit > PSimHitContainer