51 typedef std::map<uint32_t, std::vector<float> >
CMMap;
61 virtual void endJob()
override ;
81 _inputTag(conf.getParameter<
edm::InputTag> (
"CMCollection")),
88 produces< edm::DetSetVector<SiStripProcessedRawDigi> > (
"MEANAPVCM");
116 std::vector<edm::DetSet<SiStripProcessedRawDigi> > meancm;
145 meancm.reserve(15000);
148 rawDigis = input.
begin(); rawDigis != input.
end(); rawDigis++) {
152 for(uint16_t
APV = 0;
APV < rawDigis->size()/128; ++
APV){
156 if(ped < MinPed) MinPed = ped;
158 if(MinPed>128) MinPed=128;
162 meancm.push_back(MeanCMDetSet);
169 CMMap::iterator itMap;
172 for(itInput = Input.
begin(); itInput != Input.
end(); ++itInput){
174 itMap =
_CMMap.find(detId);
176 std::vector<float> MeanCMNValue;
177 MeanCMNValue.clear();
179 std::vector< float >& MapContent = itMap->second;
180 std::vector<float>::iterator itMapVector = MapContent.begin();
181 for(itCM = itInput->
begin(); itCM != itInput->
end(); ++itCM, ++itMapVector){
182 MeanCMNValue.push_back(itCM->adc() + *itMapVector);
185 _CMMap.insert(itMap, std::pair<uint32_t, std::vector<float> >(detId,MeanCMNValue));
187 for(itCM = itInput->
begin(); itCM != itInput->
end(); ++itCM) MeanCMNValue.push_back(itCM->adc());
188 _CMMap.insert(std::pair<uint32_t, std::vector<float> >(detId,MeanCMNValue));
196 CMMap::iterator itMap;
197 std::vector<float>::const_iterator itMapVector;
200 meancm.reserve(15000);
202 for(itMap =
_CMMap.begin(); itMap !=
_CMMap.end(); ++itMap){
204 for(itMapVector = (itMap->second).begin(); itMapVector != (itMap->second).
end(); ++itMapVector) MeanCMDetSet.
push_back(*itMapVector/(
float)
_actualEvent);
205 meancm.push_back(MeanCMDetSet);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void push_back(const T &t)
#define DEFINE_FWK_MODULE(type)
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
float getPed(const uint16_t &strip, const Range &range) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
std::map< uint32_t, std::vector< float > > CMMap
iterator begin()
Return an iterator to the first DetSet.
const Range getRange(const uint32_t &detID) const
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator