8 #include "CLHEP/Units/GlobalPhysicalConstants.h"
9 #include "CLHEP/Units/GlobalSystemOfUnits.h"
45 mapI != lastSignal; ++mapI)
47 int wireGroup = (*mapI).first;
49 LogTrace(
"CSCWireElectronicsSim") <<
"CSCWireElectronicsSim: dump of wire signal follows... "
51 int signalSize = signal.
getSize();
61 for(
int ibin = 0; ibin < signalSize; ++ibin)
67 int lastbin = signalSize;
69 for(i = ibin; i < signalSize; ++
i) {
78 for ( i = ibin; i < lastbin; ++
i)
81 if(next_charge > qMax) {
86 int bin_firing_FD = 0;
87 for ( i = ibin; i < lastbin; ++
i)
121 int bxInt =
static_cast<int>(bxFloat);
122 if(bxFloat >= 0 && bxFloat < 16)
124 timeWord |= (1 << bxInt );
126 if(bxFloat-bxInt > 0.6)
128 timeWord |= (1 << (bxInt+1) );
152 LogTrace(
"CSCWireElectronicsSim") << newDigi;
153 digis.insertDigi(
layerId(), newDigi);
161 static const float fC_by_ns = 1000000;
162 static const float resistor = 20000;
163 static const float amplifier_pole = 1/7.5;
164 static const float fastest_chamber_exp_risetime = 10.;
165 static const float p0=amplifier_pole;
166 static const float p1=1/fastest_chamber_exp_risetime;
168 static const float dp = p0 -
p1;
172 static const float norm = -12 * resistor * p1 *
pow(p0/dp, 4) / fC_by_ns;
174 float enable_disc_volts = norm*(
exp(-p0*t) *(1 +
179 static const float collectionFraction = 0.12;
180 static const float igain = 1./0.005;
181 return enable_disc_volts * igain * collectionFraction;
188 int middleWireGroup = wireGroup - wireGroup%8 + 4;
190 if(middleWireGroup > numberOfWireGroups)
191 middleWireGroup = numberOfWireGroups;
194 float averageDist = centerOfGroupGroup.
mag();
195 float averageTOF = averageDist * cm / c_light;
197 LogTrace(
"CSCWireElectronicsSim") <<
"CSCWireElectronicsSim: TofCalib wg = " << wireGroup <<
198 " mid wg = " << middleWireGroup <<
199 " av dist = " << averageDist <<
200 " av tof = " << averageTOF;
std::vector< double > theBunchTimingOffsets
const CSCLayer * theLayer
const CSCChamberSpecs * theSpecs
CSCSignalMap theSignalMap
const CSCLayerGeometry * theLayerGeometry
float getBinValue(int i) const
float calculateAmpResponse(float t) const
virtual int channelIndex(int channel) const
we code strip indices from 1-80, and wire indices start at 100
CSCWireElectronicsSim(const edm::ParameterSet &p)
configurable parameters
int numberOfWireGroups() const
CLHEP::RandGaussQ * theRandGaussQ
int wireGroup(int wire) const
float wireNoise(float timeInterval) const
virtual void initParameters()
initialization for each layer
GlobalPoint centerOfWireGroup(int wireGroup) const
virtual void addLinks(int channelIndex)
virtual int readoutElement(int element) const
void fillDigis(CSCWireDigiCollection &digis)
CSCDetId layerId() const
the CSCDetId corresponding to the current layer
virtual float timeOfFlightCalibration(int wireGroup) const
Power< A, B >::type pow(const A &a, const B &b)
std::vector< double > theTimingCalibrationError