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 Pythia6Decays;
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 
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  const RandomEngine* engine);
75 
78 
80  void reconstruct();
81 
83  void createPSimHits(const TrackerLayer& layer,
84  const ParticlePropagator& P_before,
85  std::map<double,PSimHit>& theHitMap,
86  int trackID, int partID);
87 
90  int fsimi);
91 
92 
95  bool propagateToLayer(ParticlePropagator& PP,unsigned layer);
96 
99 
101  void initializeRecoGeometry(const GeometricSearchTracker* geomSearchTracker,
102  const TrackerInteractionGeometry* interactionGeometry,
103  const MagneticFieldMap* aFieldMap);
104 
106  void initializeTrackerGeometry(const TrackerGeometry* geomTracker);
107 
108  // load container from edm::Event
109  void loadSimHits(edm::PSimHitContainer & c) const;
110 
111  private:
112 
114  void updateWithDaughters(ParticlePropagator& PP, int fsimi);
115 
117  void moveAllDaughters(int fsimi, const Rotation& r, double rescale);
118 
120  void initializeLayerMap();
121 
124  const ParticlePropagator& pp,
125  const MagneticField* field) const;
126 
128  void makePSimHits( const GeomDet* det, const TrajectoryStateOnSurface& ts,
129  std::map<double,PSimHit>& theHitMap,
130  int tkID, float el, float thick, int pID);
132  std::pair<double,PSimHit> makeSinglePSimHit( const GeomDetUnit& det,
133  const TrajectoryStateOnSurface& ts,
134  int tkID, float el, float thick, int pID) const;
135 
137  const DetLayer* detLayer( const TrackerLayer& layer, float zpos) const;
138 
139  private:
140 
142 
145 
147 
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
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.
void makePSimHits(const GeomDet *det, const TrajectoryStateOnSurface &ts, std::map< double, PSimHit > &theHitMap, int tkID, float el, float thick, int pID)
and there
tuple pp
Definition: createTree.py:15
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 createPSimHits(const TrackerLayer &layer, const ParticlePropagator &P_before, std::map< double, PSimHit > &theHitMap, int trackID, int partID)
Create a vector of PSimHits.
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 RandomEngine * random
const TrackerInteractionGeometry * _theGeometry
MaterialEffects * theMaterialEffects
void updateWithDaughters(ParticlePropagator &PP, int fsimi)
Decay the particle and update the SimEvent with daughters.
void reconstruct()
Does the real job.
std::pair< double, PSimHit > makeSinglePSimHit(const GeomDetUnit &det, const TrajectoryStateOnSurface &ts, int tkID, float el, float thick, int pID) const
and there
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)
Pythia6Decays * myDecayEngine
std::vector< PSimHit > PSimHitContainer