Go to the documentation of this file.00001 #include "TrackingTools/GsfTracking/interface/GsfCombinedMaterialEffectsUpdator.h"
00002 #include "TrackingTools/GsfTracking/interface/GsfMaterialEffectsAdapter.h"
00003
00004
00005 #include "TrackingTools/GsfTracking/interface/GsfBetheHeitlerUpdator.h"
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 GsfCombinedMaterialEffectsUpdator::GsfCombinedMaterialEffectsUpdator
00020 (GsfMaterialEffectsUpdator& msUpdator,
00021 GsfMaterialEffectsUpdator& elUpdator) :
00022 GsfMaterialEffectsUpdator(msUpdator.mass()),
00023 theMSUpdator(msUpdator.clone()),
00024 theELUpdator(elUpdator.clone()) {}
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 void GsfCombinedMaterialEffectsUpdator::compute (const TrajectoryStateOnSurface& TSoS,
00047 const PropagationDirection propDir) const
00048 {
00049
00050
00051
00052 theWeights.clear();
00053 theDeltaPs.clear();
00054 theDeltaCovs.clear();
00055
00056
00057
00058 std::vector<double> msWeights = theMSUpdator->weights(TSoS,propDir);
00059 std::vector<double> msDeltaPs = theMSUpdator->deltaPs(TSoS,propDir);
00060 std::vector<AlgebraicSymMatrix55> msDeltaCovs = theMSUpdator->deltaLocalErrors(TSoS,propDir);
00061 if ( msWeights.empty() ) {
00062
00063
00064
00065 msWeights.push_back(1.);
00066 msDeltaPs.push_back(0.);
00067 msDeltaCovs.push_back(AlgebraicSymMatrix55());
00068 }
00069
00070
00071
00072 std::vector<double> elWeights = theELUpdator->weights(TSoS,propDir);
00073 std::vector<double> elDeltaPs = theELUpdator->deltaPs(TSoS,propDir);
00074 std::vector<AlgebraicSymMatrix55> elDeltaCovs = theELUpdator->deltaLocalErrors(TSoS,propDir);
00075 if ( elWeights.empty() ) {
00076
00077
00078
00079 elWeights.push_back(1.);
00080 elDeltaPs.push_back(0.);
00081 elDeltaCovs.push_back(AlgebraicSymMatrix55());
00082 }
00083
00084
00085
00086 std::vector<double>::const_iterator iMsWgt(msWeights.begin());
00087 std::vector<double>::const_iterator iMsDp(msDeltaPs.begin());
00088 std::vector<AlgebraicSymMatrix55>::const_iterator iMsDc(msDeltaCovs.begin());
00089 for ( ; iMsWgt<msWeights.end(); iMsWgt++,iMsDp++,iMsDc++ ) {
00090
00091 std::vector<double>::const_iterator iElWgt(elWeights.begin());
00092 std::vector<double>::const_iterator iElDp(elDeltaPs.begin());
00093 std::vector<AlgebraicSymMatrix55>::const_iterator iElDc(elDeltaCovs.begin());
00094 for ( ; iElWgt<elWeights.end(); iElWgt++,iElDp++,iElDc++ ) {
00095 theWeights.push_back((*iMsWgt)*(*iElWgt));
00096 theDeltaPs.push_back((*iMsDp)+(*iElDp));
00097 theDeltaCovs.push_back((*iMsDc)+(*iElDc));
00098 }
00099 }
00100
00101 }
00102