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 //#define mydigidebug6 00013 00014 void PileUpFP420::add(HitDigitizerFP420::hit_map_type in, const PSimHit& hit){ 00015 00016 00017 #ifdef mydigidebug6 00018 std::cout << " ==========================****PileUpFP420: add start = " << std::endl; 00019 #endif 00020 for (HitDigitizerFP420::hit_map_type::const_iterator im = in.begin(); im!=in.end(); im++ ){ 00021 00022 theMap[(*im).first] += Amplitude((*im).second); 00023 00024 theMapLink[(*im).first].push_back( pair < const PSimHit*, Amplitude > ( &hit, Amplitude((*im).second) ) ); 00025 00026 #ifdef mydigidebug6 00027 std::cout << "*********** Amplitude((*im).first) = " << Amplitude((*im).first) << std::endl; 00028 std::cout << " Amplitude((*im).second) = " << Amplitude((*im).second) << std::endl; 00029 #endif 00030 } // for loop 00031 #ifdef mydigidebug6 00032 std::cout << " ==========================****PileUpFP420: add end = " << std::endl; 00033 #endif 00034 } 00035 void PileUpFP420::resetSignal(){ 00036 theMap.clear(); 00037 } 00038 void PileUpFP420::resetLink(){ 00039 theMapLink.clear(); 00040 }