CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/SimRomanPot/SimFP420/src/PileUpFP420.cc

Go to the documentation of this file.
00001 
00002 // File: PileUpFP420.cc
00003 // Date: 12.2006
00004 // Description: PileUpFP420 for FP420
00005 // Modifications: 
00007 //#include "SimG4CMS/FP420/interface/FP420G4HitCollection.h"
00008 //#include "SimG4CMS/FP420/interface/FP420G4Hit.h"
00009 #include "SimRomanPot/SimFP420/interface/PileUpFP420.h"
00010 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00011 //#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00012 
00013 void PileUpFP420::add(HitDigitizerFP420::hit_map_type in, const PSimHit& hit, int verbosity){
00014   
00015   
00016   if(verbosity>0) {
00017     std::cout << " ==========================****PileUpFP420: add start       = " << std::endl;
00018   }
00019   for (HitDigitizerFP420::hit_map_type::const_iterator im = in.begin(); im!=in.end(); im++ ){
00020     
00021     theMap[(*im).first] += Amplitude((*im).second);
00022     
00023     theMapLink[(*im).first].push_back( std::pair < const PSimHit*, Amplitude >                                                     (  &hit,  Amplitude((*im).second)   )              );
00024     
00025     if(verbosity>0) {
00026       std::cout << "*********** Amplitude((*im).first)  = " << Amplitude((*im).first)  << std::endl;
00027       std::cout << " Amplitude((*im).second)  = " << Amplitude((*im).second)  << std::endl;
00028     }
00029   } // for loop
00030   
00031   if(verbosity>0) {
00032     std::cout << " ==========================****PileUpFP420: add end       = " << std::endl;
00033   }
00034 }
00035 void PileUpFP420::resetSignal(){
00036   theMap.clear();
00037 }
00038 void PileUpFP420::resetLink(){
00039   theMapLink.clear();
00040 }