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  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
TrajectoryManager::myDecayEngine
PythiaDecays * myDecayEngine
Definition: TrajectoryManager.h:153
TrajectoryManager::reconstruct
void reconstruct(const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
Does the real job.
Definition: TrajectoryManager.cc:129
TrajectoryManager::makePSimHits
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
Definition: TrajectoryManager.cc:569
bJpsiMuMuTrigSettings_cff.decays
decays
Definition: bJpsiMuMuTrigSettings_cff.py:15
TrajectoryManager::createPSimHits
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.
Definition: TrajectoryManager.cc:520
FSimEvent
Definition: FSimEvent.h:29
GeomDet
Definition: GeomDet.h:27
TrajectoryManager::initializeTrackerGeometry
void initializeTrackerGeometry(const TrackerGeometry *geomTracker)
Initialize the full Tracker Geometry.
Definition: TrajectoryManager.cc:112
TrajectoryManager::detLayer
const DetLayer * detLayer(const TrackerLayer &layer, float zpos) const
Returns the DetLayer pointer corresponding to the FAMOS layer.
Definition: TrajectoryManager.cc:844
TrajectoryManager::propagateToCalorimeters
void propagateToCalorimeters(ParticlePropagator &PP, int fsimi, RandomEngineAndDistribution const *)
Propagate the particle through the calorimeters.
Definition: TrajectoryManager.cc:361
DetLayer
Definition: DetLayer.h:21
TrajectoryManager::initializeRecoGeometry
void initializeRecoGeometry(const GeometricSearchTracker *geomSearchTracker, const TrackerInteractionGeometry *interactionGeometry, const MagneticFieldMap *aFieldMap)
Initialize the Reconstruction Geometry.
Definition: TrajectoryManager.cc:97
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
TrajectoryManager::moveAllDaughters
void moveAllDaughters(int fsimi, const Rotation &r, double rescale)
Move, rescale and rotate all daughters after propagation, material effects and decay of the mother.
Definition: TrajectoryManager.cc:502
TrajectoryManager::_theFieldMap
const MagneticFieldMap * _theFieldMap
Definition: TrajectoryManager.h:149
PSimHitContainer.h
MagneticFieldMap
Definition: MagneticFieldMap.h:18
TrajectoryManager::theGeomSearchTracker
const GeometricSearchTracker * theGeomSearchTracker
Definition: TrajectoryManager.h:162
FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition: FastTrackerRecHitCombiner_cfi.py:5
TrajectoryManager::theGeomTracker
const TrackerGeometry * theGeomTracker
Definition: TrajectoryManager.h:161
TrajectoryManager::Rotation
ROOT::Math::AxisAngle Rotation
Definition: TrajectoryManager.h:63
MaterialEffects
Definition: MaterialEffects.h:51
TrajectoryManager::decayer
std::string decayer
Definition: TrajectoryManager.h:154
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PSimHit.h
TrajectoryManager::~TrajectoryManager
~TrajectoryManager()
Default Destructor.
Definition: TrajectoryManager.cc:116
TrajectoryManager::pTmin
double pTmin
Definition: TrajectoryManager.h:157
TrajectoryManager::makeSinglePSimHit
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
Definition: TrajectoryManager.cc:590
TrajectoryManager::theMaterialEffects
MaterialEffects * theMaterialEffects
Definition: TrajectoryManager.h:151
MuonErrorMatrixAdjuster_cfi.rescale
rescale
Definition: MuonErrorMatrixAdjuster_cfi.py:8
TrajectoryManager::use_hardcoded
bool use_hardcoded
Definition: TrajectoryManager.h:168
TrackerInteractionGeometry
Definition: TrackerInteractionGeometry.h:23
TrajectoryManager::TrajectoryManager
TrajectoryManager()
Default Constructor.
Definition: TrajectoryManager.h:66
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrajectoryManager::_theGeometry
const TrackerInteractionGeometry * _theGeometry
Definition: TrajectoryManager.h:148
edm::ParameterSet
Definition: ParameterSet.h:47
MaterialEffects.h
ParameterSet
Definition: Functions.h:16
TrackerLayer
Definition: TrackerLayer.h:13
ParticlePropagator
Definition: ParticlePropagator.h:28
PythiaDecays
Definition: PythiaDecays.h:28
TrajectoryManager::theNegLayerOffset
int theNegLayerOffset
Definition: TrajectoryManager.h:164
TrajectoryManager::thePSimHits
std::map< unsigned, std::map< double, PSimHit > > thePSimHits
Definition: TrajectoryManager.h:159
TrajectoryManager::firstLoop
bool firstLoop
Definition: TrajectoryManager.h:158
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TrajectoryManager::makeTrajectoryState
TrajectoryStateOnSurface makeTrajectoryState(const DetLayer *layer, const ParticlePropagator &pp, const MagneticField *field) const
Teddy, you must put comments there.
Definition: TrajectoryManager.cc:559
TrajectoryManager::loadSimHits
void loadSimHits(edm::PSimHitContainer &c) const
Definition: TrajectoryManager.cc:851
GeomDet.h
TrajectoryManager::theLayerMap
std::vector< const DetLayer * > theLayerMap
Definition: TrajectoryManager.h:163
TrajectoryManager::theGeometry
const TrackerInteractionGeometry * theGeometry()
Returns the pointer to geometry.
Definition: TrajectoryManager.cc:114
GeometricSearchTracker
Definition: GeometricSearchTracker.h:15
TrajectoryManager::propagateToLayer
bool propagateToLayer(ParticlePropagator &PP, unsigned layer)
Definition: TrajectoryManager.cc:416
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
createTree.pp
pp
Definition: createTree.py:17
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
TrajectoryManager
Definition: TrajectoryManager.h:59
TrajectoryManager::mySimEvent
FSimEvent * mySimEvent
Definition: TrajectoryManager.h:146
MagneticField
Definition: MagneticField.h:19
TrajectoryManager::distCut
double distCut
Definition: TrajectoryManager.h:155
TrajectoryManager::updateWithDaughters
void updateWithDaughters(ParticlePropagator &PP, int fsimi, RandomEngineAndDistribution const *)
Decay the particle and update the SimEvent with daughters.
Definition: TrajectoryManager.cc:438
TrajectoryManager::initializeLayerMap
void initializeLayerMap()
Initialize correspondence map between Famos interaction geometry and tracker reco geometry.
Definition: TrajectoryManager.cc:757
TrackerGeometry
Definition: TrackerGeometry.h:14
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18