17 #include "boost/foreach.hpp"
43 uint16_t
applyGain(
const uint16_t& strip,
const uint16_t&
adc );
55 : _inputTag( conf.getParameter<edm::InputTag>(
"ClusterProducer") ){
57 produces< DigiCollection > (
"ZeroSuppressed");
58 produces< DigiCollection > (
"VirginRaw" );
59 produces< DigiCollection > (
"ProcessedRaw" );
60 produces< DigiCollection > (
"ScopeMode" );
69 std::vector<DetDigiCollection> output_base;
77 std::auto_ptr< DigiCollection > outputZS(
new DigiCollection(output_base) );
82 event.put( outputZS,
"ZeroSuppressed");
83 event.put( outputVR,
"VirginRaw" );
84 event.put( outputPR,
"ProcessedRaw" );
85 event.put( outputSM,
"ScopeMode" );
93 uint32_t
detid=it->detId();
99 for(;clus!=endclus;clus++){
101 size_t width = clus->amplitudes().size();
102 size_t firstStrip = clus->firstStrip();
103 uint16_t stripPos=firstStrip;
104 for(;istrip<
width;++istrip){
111 output_base.push_back(detDigis);
137 if(adc > 255)
throw cms::Exception(
"Invalid Charge") <<
" digi at strip " << strip <<
" has ADC out of range " <<
adc;
138 if(adc > 253)
return adc;
139 uint16_t
charge =
static_cast<uint16_t
>( adc*
gain(strip) + 0.5 );
140 return ( charge > 1022 ? 255 :
141 ( charge > 253 ? 254 : charge ));
int adc(sample_type sample)
get the ADC sample (12 bits)
void setDetId(const uint32_t id)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
edm::DetSetVector< SiStripDigi > DigiCollection
const_iterator begin() const
edmNew::DetSet< SiStripCluster > DetClusterCollection
#define DEFINE_FWK_MODULE(type)
SiStripApvGain::Range gainRange
uint16_t applyGain(const uint16_t &strip, const uint16_t &adc)
data_type const * const_iterator
edm::ESHandle< SiStripGain > gainHandle
float gain(const uint16_t &strip) const
void initialize(const edm::EventSetup &es)
const edm::InputTag _inputTag
std::pair< ContainerIterator, ContainerIterator > Range
void produce(edm::Event &, const edm::EventSetup &)
edm::DetSet< SiStripDigi > DetDigiCollection
const_iterator end() const
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edmNew::DetSetVector< SiStripCluster > ClusterCollection
void process(const ClusterCollection &input, std::vector< DetDigiCollection > &output_base)
edmNew::DetSet< SiStripCluster >::const_iterator DetClusIter
SiStripClusterToDigiProducer(const edm::ParameterSet &conf)
collection_type::const_iterator const_iterator
edm::DetSet< SiStripDigi >::const_iterator DetDigiIter