Go to the documentation of this file.00001 #ifndef TRAJECTORYMANAGER_H
00002 #define TRAJECTORYMANAGER_H
00003
00004
00005 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00006 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00007
00008
00009 #include "FastSimulation/MaterialEffects/interface/MaterialEffects.h"
00010
00011 #include "Math/GenVector/AxisAngle.h"
00012
00036 #include <vector>
00037 #include <map>
00038
00039 class PythiaDecays;
00040 class TrackerInteractionGeometry;
00041 class TrackerLayer;
00042 class ParticlePropagator;
00043 class FSimEvent;
00044
00045 class RandomEngine;
00046 class TrajectoryStateOnSurface;
00047 class DetLayer;
00048 class GeomDet;
00049 class GeomDetUnit;
00050 class MagneticField;
00051 class MagneticFieldMap;
00052 class GeometricSearchTracker;
00053 class TrackerGeometry;
00054 class TrackerTopology;
00055
00056 namespace edm {
00057 class ParameterSet;
00058 }
00059
00060 class TrajectoryManager
00061
00062 {
00063 public:
00064
00065 typedef ROOT::Math::AxisAngle Rotation;
00066
00068 TrajectoryManager() {;}
00069
00071 TrajectoryManager(FSimEvent* aSimEvent,
00072 const edm::ParameterSet& matEff,
00073 const edm::ParameterSet& simHits,
00074 const edm::ParameterSet& decays,
00075 const RandomEngine* engine);
00076
00078 ~TrajectoryManager();
00079
00081 void reconstruct(const TrackerTopology *tTopo);
00082
00084 void createPSimHits(const TrackerLayer& layer,
00085 const ParticlePropagator& P_before,
00086 std::map<double,PSimHit>& theHitMap,
00087 int trackID, int partID, const TrackerTopology *tTopo);
00088
00090 void propagateToCalorimeters(ParticlePropagator& PP,
00091 int fsimi);
00092
00093
00096 bool propagateToLayer(ParticlePropagator& PP,unsigned layer);
00097
00099 const TrackerInteractionGeometry* theGeometry();
00100
00102 void initializeRecoGeometry(const GeometricSearchTracker* geomSearchTracker,
00103 const TrackerInteractionGeometry* interactionGeometry,
00104 const MagneticFieldMap* aFieldMap);
00105
00107 void initializeTrackerGeometry(const TrackerGeometry* geomTracker);
00108
00109
00110 void loadSimHits(edm::PSimHitContainer & c) const;
00111
00112 private:
00113
00115 void updateWithDaughters(ParticlePropagator& PP, int fsimi);
00116
00118 void moveAllDaughters(int fsimi, const Rotation& r, double rescale);
00119
00121 void initializeLayerMap();
00122
00124 TrajectoryStateOnSurface makeTrajectoryState( const DetLayer* layer,
00125 const ParticlePropagator& pp,
00126 const MagneticField* field) const;
00127
00129 void makePSimHits( const GeomDet* det, const TrajectoryStateOnSurface& ts,
00130 std::map<double,PSimHit>& theHitMap,
00131 int tkID, float el, float thick, int pID, const TrackerTopology *tTopo);
00133 std::pair<double,PSimHit> makeSinglePSimHit( const GeomDetUnit& det,
00134 const TrajectoryStateOnSurface& ts,
00135 int tkID, float el, float thick, int pID, const TrackerTopology *tTopo) const;
00136
00138 const DetLayer* detLayer( const TrackerLayer& layer, float zpos) const;
00139
00140 private:
00141
00142 FSimEvent* mySimEvent;
00143
00144 const TrackerInteractionGeometry* _theGeometry;
00145 const MagneticFieldMap* _theFieldMap;
00146
00147 MaterialEffects* theMaterialEffects;
00148
00149 PythiaDecays* myDecayEngine;
00150 std::string decayer;
00151 double distCut;
00152
00153 double pTmin;
00154 bool firstLoop;
00155 std::map<unsigned,std::map<double,PSimHit> > thePSimHits;
00156
00157 const TrackerGeometry* theGeomTracker;
00158 const GeometricSearchTracker* theGeomSearchTracker;
00159 std::vector<const DetLayer*> theLayerMap;
00160 int theNegLayerOffset;
00161
00162
00163
00164 const RandomEngine* random;
00165
00166 bool use_hardcoded;
00167
00168 };
00169 #endif