CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/TrackingTools/GsfTracking/src/FullConvolutionWithMaterial.cc

Go to the documentation of this file.
00001 #include "TrackingTools/GsfTracking/interface/FullConvolutionWithMaterial.h"
00002 
00003 #include "TrackingTools/GsfTools/interface/MultiTrajectoryStateAssembler.h"
00004 
00005 TrajectoryStateOnSurface
00006 FullConvolutionWithMaterial::operator() (const TrajectoryStateOnSurface& tsos,
00007                                          const PropagationDirection propDir) const {
00008   //
00009   // decomposition of input state
00010   //
00011   typedef std::vector<TrajectoryStateOnSurface> MultiTSOS;  
00012   MultiTSOS input(tsos.components());
00013   //
00014   // vector of result states
00015   //
00016   MultiTrajectoryStateAssembler result;
00017   //
00018   // now add material effects to each component
00019   //
00020   for ( MultiTSOS::const_iterator iTsos=input.begin();
00021         iTsos!=input.end(); iTsos++ ) {
00022     //
00023     // add material
00024     //
00025     TrajectoryStateOnSurface updatedTSoS = 
00026       theMEUpdator->updateState(*iTsos,propDir);
00027     if ( updatedTSoS.isValid() )
00028       result.addState(updatedTSoS);
00029     else
00030       result.addInvalidState(iTsos->weight());
00031   }
00032   return result.combinedState();
00033 }
00034 
00035 //  TimingReport::Item* FullConvolutionWithMaterial::theTimer1(0);
00036 //  TimingReport::Item* FullConvolutionWithMaterial::theTimer2(0);