CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
SiPixelDigitizerAlgorithm Class Reference

#include <SiPixelDigitizerAlgorithm.h>

Classes

class  Amplitude
 
class  CalParameters
 
class  EnergyDepositUnit
 
class  SignalPoint
 

Public Member Functions

void fillDeadModules (const edm::EventSetup &es)
 
void fillLorentzAngle (const edm::EventSetup &es)
 
void fillMapandGeom (const edm::EventSetup &es)
 
void init (const edm::EventSetup &es)
 
std::vector< PixelDigiSimLinkmake_link ()
 
edm::DetSet< PixelDigi >
::collection_type 
run (const std::vector< PSimHit > &input, PixelGeomDetUnit *pixdet, GlobalVector)
 
 SiPixelDigitizerAlgorithm (const edm::ParameterSet &conf, CLHEP::HepRandomEngine &)
 
 ~SiPixelDigitizerAlgorithm ()
 

Private Types

typedef GloballyPositioned
< double > 
Frame
 
typedef std::vector
< edm::ParameterSet
Parameters
 
typedef signal_map_type::iterator signal_map_iterator
 
typedef std::map< int,
Amplitude, std::less< int > > 
signal_map_type
 
typedef std::map< unsigned int,
std::vector< float >
, std::less< unsigned int > > 
simlink_map
 

Private Member Functions

void add_noise ()
 
std::vector< PixelDigidigitize (PixelGeomDetUnit *det)
 
void drift (const PSimHit &hit)
 
LocalVector DriftDirection ()
 
void fluctuateEloss (int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[])
 
void induce_signal (const PSimHit &hit)
 
void make_digis ()
 
float missCalibrate (int col, int row, float amp) const
 
void module_killing_conf ()
 
void module_killing_DB ()
 
void pixel_inefficiency ()
 
void pixel_inefficiency_db ()
 
void primary_ionization (const PSimHit &hit)
 

Private Attributes

GlobalVector _bfield
 
std::vector< SignalPoint_collection_points
 
const PixelGeomDetUnit_detp
 
std::vector< EnergyDepositUnit_ionization_points
 
std::vector< PSimHit_PixelHits
 
signal_map_type _signal
 
bool addChargeVCALSmearing
 
bool addNoise
 
bool addNoisyPixels
 
bool addPixelInefficiency
 
bool addThresholdSmearing
 
bool alpha2Order
 
float BPix_p0
 
float BPix_p1
 
float BPix_p2
 
float BPix_p3
 
std::map< int, CalParameters,
std::less< int > > 
calmap
 
float ClusterWidth
 
edm::ParameterSet conf_
 
Parameters DeadModules
 
uint32_t detID
 
float Dist300
 
bool doMissCalibrate
 
double electronsPerVCAL
 
double electronsPerVCAL_Offset
 
CLHEP::RandFlat * flatDistribution_
 
SiG4UniversalFluctuationfluctuate
 
bool fluctuateCharge
 
float FPix_p0
 
float FPix_p1
 
float FPix_p2
 
float FPix_p3
 
CLHEP::RandGaussQ * gaussDistribution_
 
CLHEP::RandGaussQ * gaussDistributionVCALNoise_
 
edm::ESHandle< TrackerGeometrygeom_
 
float GeVperElectron
 
std::vector< PixelDigiinternal_coll
 
std::vector< PixelDigiSimLinklink_coll
 
edm::ESHandle
< SiPixelFedCablingMap
map_
 
float moduleThickness
 
int NumberOfSegments
 
int numColumns
 
int numRows
 
PixelIndicespIndexConverter
 
float PixelChipEff
 
float PixelChipEfficiency
 
float PixelColEff
 
float PixelColEfficiency
 
float PixelEff
 
float PixelEfficiency
 
bool pixelInefficiency
 
CLHEP::HepRandomEngine & rndEngine
 
float Sigma0
 
simlink_map simi
 
edm::ESHandle< SiPixelQualitySiPixelBadModule_
 
edm::ESHandle
< SiPixelLorentzAngle
SiPixelLorentzAngle_
 
CLHEP::RandGaussQ * smearedChargeDistribution_
 
CLHEP::RandGaussQ * smearedThreshold_BPix_
 
CLHEP::RandGaussQ * smearedThreshold_FPix_
 
float tanLorentzAnglePerTesla_BPix
 
float tanLorentzAnglePerTesla_FPix
 
int theAdcFullScale
 
int theColsInChip
 
float theElectronPerADC
 
float theGainSmearing
 
CLHEP::RandGaussQ * theGaussianDistribution
 
float theNoiseInElectrons
 
GaussianTailNoiseGeneratortheNoiser
 
float theOffsetSmearing
 
float thePixelChipEfficiency [6]
 
float thePixelColEfficiency [6]
 
float thePixelEfficiency [6]
 
int thePixelLuminosity
 
float thePixelThreshold
 
float thePixelThresholdInE
 
float theReadoutNoise
 
int theRowsInChip
 
SiPixelGainCalibrationOfflineSimServicetheSiPixelGainCalibrationService_
 
float theSmearedChargeRMS
 
float theThresholdInE_BPix
 
float theThresholdInE_FPix
 
double theThresholdSmearing_BPix
 
double theThresholdSmearing_FPix
 
float theTofLowerCut
 
float theTofUpperCut
 
double tMax
 
const PixelTopologytopol
 
bool use_deadmodule_DB_
 
bool use_ineff_from_db_
 
bool use_LorentzAngle_DB_
 
bool use_module_killing_
 

Detailed Description

Definition at line 59 of file SiPixelDigitizerAlgorithm.h.

Member Typedef Documentation

Definition at line 231 of file SiPixelDigitizerAlgorithm.h.

Definition at line 90 of file SiPixelDigitizerAlgorithm.h.

typedef signal_map_type::iterator SiPixelDigitizerAlgorithm::signal_map_iterator
private

Definition at line 228 of file SiPixelDigitizerAlgorithm.h.

typedef std::map< int, Amplitude, std::less<int> > SiPixelDigitizerAlgorithm::signal_map_type
private

Definition at line 227 of file SiPixelDigitizerAlgorithm.h.

typedef std::map<unsigned int, std::vector<float>,std::less<unsigned int> > SiPixelDigitizerAlgorithm::simlink_map
private

Definition at line 230 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

SiPixelDigitizerAlgorithm::SiPixelDigitizerAlgorithm ( const edm::ParameterSet conf,
CLHEP::HepRandomEngine &  eng 
)

Definition at line 140 of file SiPixelDigitizerAlgorithm.cc.

References addChargeVCALSmearing, addNoise, addNoisyPixels, addThresholdSmearing, alpha2Order, BPix_p0, BPix_p1, BPix_p2, BPix_p3, calmap, benchmark_cfg::cerr, PixelIndices::channelToPixelROC(), ClusterWidth, conf_, gather_cfg::cout, Dist300, doMissCalibrate, electronsPerVCAL, electronsPerVCAL_Offset, lut2db_cfg::filename, flatDistribution_, fluctuate, fluctuateCharge, FPix_p0, FPix_p1, FPix_p2, FPix_p3, gaussDistribution_, gaussDistributionVCALNoise_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GeVperElectron, i, recoMuon::in, geometryCSVtoXML::line, LogDebug, mergeVDriftHistosByStation::name, NumberOfSegments, L1TEmulatorMonitor_cff::p, SiPixelDigitizerAlgorithm::CalParameters::p0, SiPixelDigitizerAlgorithm::CalParameters::p1, SiPixelDigitizerAlgorithm::CalParameters::p2, SiPixelDigitizerAlgorithm::CalParameters::p3, fitWZ::par0, pixelInefficiency, PixelIndices::pixelToChannelROC(), rndEngine, Sigma0, smearedThreshold_BPix_, smearedThreshold_FPix_, theAdcFullScale, theElectronPerADC, theGainSmearing, theNoiseInElectrons, theNoiser, theOffsetSmearing, thePixelChipEfficiency, thePixelColEfficiency, thePixelEfficiency, thePixelLuminosity, theReadoutNoise, theThresholdInE_BPix, theThresholdInE_FPix, theThresholdSmearing_BPix, theThresholdSmearing_FPix, theTofLowerCut, theTofUpperCut, and tMax.

140  :
141  conf_(conf) , fluctuate(0), theNoiser(0), pIndexConverter(0),
142  use_ineff_from_db_(conf_.getParameter<bool>("useDB")),
143  use_module_killing_(conf_.getParameter<bool>("killModules")), // boolean to kill or not modules
144  use_deadmodule_DB_(conf_.getParameter<bool>("DeadModules_DB")), // boolean to access dead modules from DB
145  use_LorentzAngle_DB_(conf_.getParameter<bool>("LorentzAngle_DB")), // boolean to access Lorentz angle from DB
147 {
148  using std::cout;
149  using std::endl;
150 
151  // Common pixel parameters
152  // These are parameters which are not likely to be changed
153  NumberOfSegments = 20; // Default number of track segment divisions
154  ClusterWidth = 3.; // Charge integration spread on the collection plane
155  GeVperElectron = 3.61E-09; // 1 electron =3.61eV, 1keV=277e, mod 9/06 d.k.
156  Sigma0 = 0.00037; // Charge diffusion constant 7->3.7
157  Dist300 = 0.0300; // normalized to 300micron Silicon
158 
159  alpha2Order = conf_.getParameter<bool>("Alpha2Order"); // switch on/off of E.B effect
160 
161  // get external parameters:
162  // ADC calibration 1adc count = 135e.
163  // Corresponds to 2adc/kev, 270[e/kev]/135[e/adc]=2[adc/kev]
164  // Be carefull, this parameter is also used in SiPixelDet.cc to
165  // calculate the noise in adc counts from noise in electrons.
166  // Both defaults should be the same.
167  theElectronPerADC=conf_.getParameter<double>("ElectronPerAdc");
168 
169  // ADC saturation value, 255=8bit adc.
170  //theAdcFullScale=conf_.getUntrackedParameter<int>("AdcFullScale",255);
171  theAdcFullScale=conf_.getParameter<int>("AdcFullScale");
172 
173  // Pixel threshold in units of noise:
174  // thePixelThreshold=conf_.getParameter<double>("ThresholdInNoiseUnits");
175  // Pixel threshold in electron units.
176  theThresholdInE_FPix=conf_.getParameter<double>("ThresholdInElectrons_FPix");
177  theThresholdInE_BPix=conf_.getParameter<double>("ThresholdInElectrons_BPix");
178 
179  // Add threshold gaussian smearing:
180  addThresholdSmearing = conf_.getParameter<bool>("AddThresholdSmearing");
181  theThresholdSmearing_FPix = conf_.getParameter<double>("ThresholdSmearing_FPix");
182  theThresholdSmearing_BPix = conf_.getParameter<double>("ThresholdSmearing_BPix");
183 
184  // signal response new parameterization: split Fpix and BPix
185  FPix_p0 = conf_.getParameter<double>("FPix_SignalResponse_p0");
186  FPix_p1 = conf_.getParameter<double>("FPix_SignalResponse_p1");
187  FPix_p2 = conf_.getParameter<double>("FPix_SignalResponse_p2");
188  FPix_p3 = conf_.getParameter<double>("FPix_SignalResponse_p3");
189 
190  BPix_p0 = conf_.getParameter<double>("BPix_SignalResponse_p0");
191  BPix_p1 = conf_.getParameter<double>("BPix_SignalResponse_p1");
192  BPix_p2 = conf_.getParameter<double>("BPix_SignalResponse_p2");
193  BPix_p3 = conf_.getParameter<double>("BPix_SignalResponse_p3");
194 
195  // electrons to VCAL conversion needed in misscalibrate()
196  electronsPerVCAL = conf_.getParameter<double>("ElectronsPerVcal");
197  electronsPerVCAL_Offset = conf_.getParameter<double>("ElectronsPerVcal_Offset");
198 
199  // Add noise
200  addNoise=conf_.getParameter<bool>("AddNoise");
201 
202  // Smear the pixel charge with a gaussian which RMS is a function of the
203  // pixel charge (Danek's study)
204  addChargeVCALSmearing=conf_.getParameter<bool>("ChargeVCALSmearing");
205 
206  // Add noisy pixels
207  addNoisyPixels=conf_.getParameter<bool>("AddNoisyPixels");
208  // Noise in electrons:
209  // Pixel cell noise, relevant for generating noisy pixels
210  theNoiseInElectrons=conf_.getParameter<double>("NoiseInElectrons");
211  // Fill readout noise, including all readout chain, relevant for smearing
212  //theReadoutNoise=conf_.getUntrackedParameter<double>("ReadoutNoiseInElec",500.);
213  theReadoutNoise=conf_.getParameter<double>("ReadoutNoiseInElec");
214 
215  //theTofCut 12.5, cut in particle TOD +/- 12.5ns
216  //theTofCut=conf_.getUntrackedParameter<double>("TofCut",12.5);
217  theTofLowerCut=conf_.getParameter<double>("TofLowerCut");
218  theTofUpperCut=conf_.getParameter<double>("TofUpperCut");
219 
220  // Fluctuate charge in track subsegments
221  fluctuateCharge=conf_.getUntrackedParameter<bool>("FluctuateCharge",true);
222 
223  // delta cutoff in MeV, has to be same as in OSCAR=0.030/cmsim=1.0 MeV
224  //tMax = 0.030; // In MeV.
225  //tMax =conf_.getUntrackedParameter<double>("DeltaProductionCut",0.030);
226  tMax =conf_.getParameter<double>("DeltaProductionCut");
227 
228  // Control the pixel inefficiency
229  thePixelLuminosity=conf_.getParameter<int>("AddPixelInefficiency");
230 
231  // Get the constants for the miss-calibration studies
232  doMissCalibrate=conf_.getParameter<bool>("MissCalibrate"); // Enable miss-calibration
233  theGainSmearing=conf_.getParameter<double>("GainSmearing"); // sigma of the gain smearing
234  theOffsetSmearing=conf_.getParameter<double>("OffsetSmearing"); //sigma of the offset smearing
235 
236  //pixel inefficiency
237  // the first 3 settings [0],[1],[2] are for the barrel pixels
238  // the next 3 settings [3],[4],[5] are for the endcaps (undecided how)
239 
240  if (thePixelLuminosity==-1) { // No inefficiency, all 100% efficient
241  pixelInefficiency=false;
242  for (int i=0; i<6;i++) {
243  thePixelEfficiency[i] = 1.; // pixels = 100%
244  thePixelColEfficiency[i] = 1.; // columns = 100%
245  thePixelChipEfficiency[i] = 1.; // chips = 100%
246  }
247 
248  // include only the static (non rate depedent) efficiency
249  // Usefull for very low rates (luminosity)
250  } else if (thePixelLuminosity==0) { // static effciency
251  pixelInefficiency=true;
252  // Default efficiencies
253  for (int i=0; i<6;i++) {
254  if(i<3) { // For the barrel
255  // Assume 1% inefficiency for single pixels,
256  // this is given by faulty bump-bonding and seus.
257  thePixelEfficiency[i] = 1.-0.001; // pixels = 99.9%
258  // For columns make 0.1% default.
259  thePixelColEfficiency[i] = 1.-0.001; // columns = 99.9%
260  // A flat 0.1% inefficiency due to lost rocs
261  thePixelChipEfficiency[i] = 1.-0.001; // chips = 99.9%
262  } else { // For the endcaps
263  // Assume 1% inefficiency for single pixels,
264  // this is given by faulty bump-bonding and seus.
265  thePixelEfficiency[i] = 1.-0.001; // pixels = 99.9%
266  // For columns make 0.1% default.
267  thePixelColEfficiency[i] = 1.-0.001; // columns = 99.9%
268  // A flat 0.1% inefficiency due to lost rocs
269  thePixelChipEfficiency[i] = 1.-0.001; // chips = 99.9%
270  }
271  }
272 
273  // Include also luminosity rate dependent inefficieny
274  } else if (thePixelLuminosity>0) { // Include effciency
275  pixelInefficiency=true;
276  // Default efficiencies
277  for (int i=0; i<6;i++) {
278  if(i<3) { // For the barrel
279  // Assume 1% inefficiency for single pixels,
280  // this is given by faulty bump-bonding and seus.
281  thePixelEfficiency[i] = 1.-0.01; // pixels = 99%
282  // For columns make 1% default.
283  thePixelColEfficiency[i] = 1.-0.01; // columns = 99%
284  // A flat 0.25% inefficiency due to lost data packets from TBM
285  thePixelChipEfficiency[i] = 1.-0.0025; // chips = 99.75%
286  } else { // For the endcaps
287  // Assume 1% inefficiency for single pixels,
288  // this is given by faulty bump-bonding and seus.
289  thePixelEfficiency[i] = 1.-0.01; // pixels = 99%
290  // For columns make 1% default.
291  thePixelColEfficiency[i] = 1.-0.01; // columns = 99%
292  // A flat 0.25% inefficiency due to lost data packets from TBM
293  thePixelChipEfficiency[i] = 1.-0.0025; // chips = 99.75%
294  }
295  }
296 
297  // Special cases ( High-lumi for 4cm layer) where the readout losses are higher
298  if(thePixelLuminosity==10) { // For high luminosity, bar layer 1
299  thePixelColEfficiency[0] = 1.-0.034; // 3.4% for r=4 only
300  thePixelEfficiency[0] = 1.-0.015; // 1.5% for r=4
301  }
302 
303  } // end the pixel inefficiency part
304 
305  // Init the random number services
306  if(addNoise || thePixelLuminosity || fluctuateCharge || addThresholdSmearing ) {
307  gaussDistribution_ = new CLHEP::RandGaussQ(rndEngine, 0., theReadoutNoise);
308  gaussDistributionVCALNoise_ = new CLHEP::RandGaussQ(rndEngine, 0., 1.);
309  flatDistribution_ = new CLHEP::RandFlat(rndEngine, 0., 1.);
310 
311  if(addNoise) {
313  }
314 
315  if(fluctuateCharge) {
317  }
318 
319  // Threshold smearing with gaussian distribution:
320  if(addThresholdSmearing) {
321  smearedThreshold_FPix_ = new CLHEP::RandGaussQ(rndEngine, theThresholdInE_FPix , theThresholdSmearing_FPix);
322  smearedThreshold_BPix_ = new CLHEP::RandGaussQ(rndEngine, theThresholdInE_BPix , theThresholdSmearing_BPix);
323  }
324  } //end Init the random number services
325 
326 
327  // Prepare for the analog amplitude miss-calibration
328  if(doMissCalibrate) {
329  LogDebug ("PixelDigitizer ")
330  << " miss-calibrate the pixel amplitude ";
331 
332  const bool ReadCalParameters = false;
333  if(ReadCalParameters) { // Read the calibration files from file
334  // read the calibration constants from a file (testing only)
335  ifstream in_file; // data file pointer
336  char filename[80] = "phCalibrationFit_C0.dat";
337 
338  in_file.open(filename, ios::in ); // in C++
339  if (in_file.bad()) {
340  cout << " File not found " << endl;
341  return; // signal error
342  }
343  cout << " file opened : " << filename << endl;
344 
345  char line[500];
346  for (int i = 0; i < 3; i++) {
347  in_file.getline(line, 500,'\n');
348  cout<<line<<endl;
349  }
350 
351  cout << " test map" << endl;
352 
353  float par0,par1,par2,par3;
354  int colid,rowid;
355  string name;
356  // Read MC tracks
357  for(int i=0;i<(52*80);i++) { // loop over tracks
358  in_file >> par0 >> par1 >> par2 >> par3 >> name >> colid
359  >> rowid;
360  if (in_file.bad()) { // check for errors
361  cerr << "Cannot read data file" << endl;
362  return;
363  }
364  if ( in_file.eof() != 0 ) {
365  cerr << in_file.eof() << " " << in_file.gcount() << " "
366  << in_file.fail() << " " << in_file.good() << " end of file "
367  << endl;
368  return;
369  }
370 
371  //cout << " line " << i << " " <<par0<<" "<<par1<<" "<<par2<<" "<<par3<<" "
372  // <<colid<<" "<<rowid<<endl;
373 
374  CalParameters onePix;
375  onePix.p0=par0;
376  onePix.p1=par1;
377  onePix.p2=par2;
378  onePix.p3=par3;
379 
380  // Convert ROC pixel index to channel
381  int chan = PixelIndices::pixelToChannelROC(rowid,colid);
382  calmap.insert(pair<int,CalParameters>(chan,onePix));
383 
384  // Testing the index conversion, can be skipped
385  pair<int,int> p = PixelIndices::channelToPixelROC(chan);
386  if(rowid!=p.first) cout<<" wrong channel row "<<rowid<<" "<<p.first<<endl;
387  if(colid!=p.second) cout<<" wrong channel col "<<colid<<" "<<p.second<<endl;
388 
389  } // pixel loop in a ROC
390 
391  cout << " map size " << calmap.size() <<" max "<<calmap.max_size() << " "
392  <<calmap.empty()<< endl;
393 
394 // cout << " map size " << calmap.size() << endl;
395 // map<int,CalParameters,less<int> >::iterator ix,it;
396 // map<int,CalParameters,less<int> >::const_iterator ip;
397 // for (ix = calmap.begin(); ix != calmap.end(); ++ix) {
398 // int i = (*ix).first;
399 // pair<int,int> p = channelToPixelROC(i);
400 // it = calmap.find(i);
401 // CalParameters y = (*it).second;
402 // CalParameters z = (*ix).second;
403 // cout << i <<" "<<p.first<<" "<<p.second<<" "<<y.p0<<" "<<z.p0<<" "<<calmap[i].p0<<endl;
404 
405 // //int dummy=0;
406 // //cin>>dummy;
407 // }
408 
409  } // end if readparameters
410  } // end if missCalibration
411 
412  LogInfo ("PixelDigitizer ") <<"SiPixelDigitizerAlgorithm constructed"
413  <<"Configuration parameters:"
414  << "Threshold/Gain = "
415  << "threshold in electron FPix = "
416  << theThresholdInE_FPix
417  << "threshold in electron BPix = "
418  << theThresholdInE_BPix
419  <<" " << theElectronPerADC << " " << theAdcFullScale
420  << " The delta cut-off is set to " << tMax
421  << " pix-inefficiency "<<thePixelLuminosity;
422 
423 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
GaussianTailNoiseGenerator * theNoiser
SiG4UniversalFluctuation * fluctuate
SiPixelGainCalibrationOfflineSimService * theSiPixelGainCalibrationService_
CLHEP::RandGaussQ * gaussDistributionVCALNoise_
static int pixelToChannelROC(const int rowROC, const int colROC)
Definition: PixelIndices.h:250
static std::pair< int, int > channelToPixelROC(const int chan)
Definition: PixelIndices.h:253
std::map< int, CalParameters, std::less< int > > calmap
tuple par0
Definition: fitWZ.py:51
CLHEP::RandGaussQ * smearedThreshold_FPix_
CLHEP::RandGaussQ * smearedThreshold_BPix_
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:41
CLHEP::HepRandomEngine & rndEngine
SiPixelDigitizerAlgorithm::~SiPixelDigitizerAlgorithm ( )

Definition at line 425 of file SiPixelDigitizerAlgorithm.cc.

References addNoise, addThresholdSmearing, flatDistribution_, fluctuate, fluctuateCharge, gaussDistribution_, gaussDistributionVCALNoise_, LogDebug, smearedThreshold_BPix_, smearedThreshold_FPix_, theNoiser, and theSiPixelGainCalibrationService_.

425  {
426 
427  LogDebug ("PixelDigitizer")<<"SiPixelDigitizerAlgorithm deleted";
428 
429  // Destructor
430  delete gaussDistribution_;
432  delete flatDistribution_;
433 
435 
436  // Threshold gaussian smearing:
438  delete smearedThreshold_FPix_;
439  delete smearedThreshold_BPix_;
440  }
441 
442  if(addNoise) delete theNoiser;
443  if(fluctuateCharge) delete fluctuate;
444 
445 }
#define LogDebug(id)
GaussianTailNoiseGenerator * theNoiser
SiG4UniversalFluctuation * fluctuate
SiPixelGainCalibrationOfflineSimService * theSiPixelGainCalibrationService_
CLHEP::RandGaussQ * gaussDistributionVCALNoise_
CLHEP::RandGaussQ * smearedThreshold_FPix_
CLHEP::RandGaussQ * smearedThreshold_BPix_

Member Function Documentation

void SiPixelDigitizerAlgorithm::add_noise ( )
private

Definition at line 1144 of file SiPixelDigitizerAlgorithm.cc.

References _signal, addChargeVCALSmearing, addNoisyPixels, gaussDistribution_, gaussDistributionVCALNoise_, GaussianTailNoiseGenerator::generate(), i, LogDebug, numColumns, numRows, PixelDigi::pixelToChannel(), theNoiseInElectrons, theNoiser, thePixelThreshold, theSmearedChargeRMS, theThresholdInE_BPix, and theThresholdInE_FPix.

Referenced by digitize().

1144  {
1145 
1146 #ifdef TP_DEBUG
1147  LogDebug ("Pixel Digitizer") << " enter add_noise " << theNoiseInElectrons;
1148 #endif
1149 
1150  // First add noise to hit pixels
1151 
1152  for ( signal_map_iterator i = _signal.begin(); i != _signal.end(); i++) {
1153 
1155  {
1156  if((*i).second < 3000)
1157  {
1158  theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1159  } else if((*i).second < 6000){
1160  theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1161  } else{
1162  theSmearedChargeRMS = -432.4 +(*i).second * 0.123;
1163  }
1164 
1165  // Noise from Vcal smearing:
1166  float noise_ChargeVCALSmearing = theSmearedChargeRMS * gaussDistributionVCALNoise_->fire() ;
1167  // Noise from full readout:
1168  float noise = gaussDistribution_->fire() ;
1169 
1170  if(((*i).second + Amplitude(noise+noise_ChargeVCALSmearing,0,-1.)) < 0. ) {
1171  (*i).second.set(0);}
1172  else{
1173  (*i).second +=Amplitude(noise+noise_ChargeVCALSmearing,0,-1.);
1174  }
1175 
1176  } // End if addChargeVCalSmearing
1177  else
1178  {
1179  // Noise: ONLY full READOUT Noise.
1180  // Use here the FULL readout noise, including TBM,ALT,AOH,OPT-REC.
1181 
1182  float noise = gaussDistribution_->fire() ;
1183  if(((*i).second + Amplitude(noise,0,-1.)) < 0. ) {
1184  (*i).second.set(0);}
1185  else{
1186  (*i).second +=Amplitude(noise,0,-1.);
1187  }
1188  } // end if only Noise from full readout
1189 
1190  }
1191 
1192  if(!addNoisyPixels) // Option to skip noise in non-hit pixels
1193  return;
1194 
1195  // Add noise on non-hit pixels
1196  // Use here the pixel noise
1197  int numberOfPixels = (numRows * numColumns);
1198  map<int,float, less<int> > otherPixels;
1199  map<int,float, less<int> >::iterator mapI;
1200 
1201  theNoiser->generate(numberOfPixels,
1202  thePixelThreshold, //thr. in un. of nois
1203  theNoiseInElectrons, // noise in elec.
1204  otherPixels );
1205 
1206 #ifdef TP_DEBUG
1207  LogDebug ("Pixel Digitizer")
1208  << " Add noisy pixels " << numRows << " "
1209  << numColumns << " " << theNoiseInElectrons << " "
1210  << theThresholdInE_FPix << theThresholdInE_BPix <<" "<< numberOfPixels<<" "
1211  << otherPixels.size() ;
1212 #endif
1213 
1214  // Add noisy pixels
1215  for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
1216  int iy = ((*mapI).first) / numRows;
1217  int ix = ((*mapI).first) - (iy*numRows);
1218 
1219  // Keep for a while for testing.
1220  if( iy < 0 || iy > (numColumns-1) )
1221  LogWarning ("Pixel Geometry") << " error in iy " << iy ;
1222  if( ix < 0 || ix > (numRows-1) )
1223  LogWarning ("Pixel Geometry") << " error in ix " << ix ;
1224 
1225  int chan = PixelDigi::pixelToChannel(ix, iy);
1226 
1227 #ifdef TP_DEBUG
1228  LogDebug ("Pixel Digitizer")
1229  <<" Storing noise = " << (*mapI).first << " " << (*mapI).second
1230  << " " << ix << " " << iy << " " << chan ;
1231 #endif
1232 
1233  if(_signal[chan] == 0){
1234  // float noise = float( (*mapI).second );
1235  int noise=int( (*mapI).second );
1236  _signal[chan] = Amplitude (noise, 0,-1.);
1237  }
1238  }
1239 
1240 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
GaussianTailNoiseGenerator * theNoiser
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:47
CLHEP::RandGaussQ * gaussDistributionVCALNoise_
signal_map_type::iterator signal_map_iterator
void generate(int NumberOfchannels, float threshold, float noiseRMS, std::map< int, float > &theMap)
vector< PixelDigi > SiPixelDigitizerAlgorithm::digitize ( PixelGeomDetUnit det)
private

Definition at line 482 of file SiPixelDigitizerAlgorithm.cc.

References _collection_points, _PixelHits, _signal, add_noise(), addNoise, addNoisyPixels, addThresholdSmearing, BoundSurface::bounds(), detID, doMissCalibrate, drift(), induce_signal(), internal_coll, LogDebug, make_digis(), module_killing_conf(), module_killing_DB(), moduleThickness, PixelTopology::ncolumns(), PixelTopology::nrows(), numColumns, numRows, pIndexConverter, pixel_inefficiency(), pixel_inefficiency_db(), PixelSubdetector::PixelBarrel, pixelInefficiency, primary_ionization(), smearedThreshold_BPix_, smearedThreshold_FPix_, GeomDet::specificSurface(), PixelGeomDetUnit::specificTopology(), DetId::subdetId(), theNoiseInElectrons, thePixelThreshold, thePixelThresholdInE, theThresholdInE_BPix, theThresholdInE_FPix, theTofLowerCut, theTofUpperCut, Bounds::thickness(), topol, use_deadmodule_DB_, use_ineff_from_db_, and use_module_killing_.

Referenced by run().

482  {
483 
484  if( _PixelHits.size() > 0 || addNoisyPixels) {
485 
486  topol=&det->specificTopology(); // cache topology
487  numColumns = topol->ncolumns(); // det module number of cols&rows
488  numRows = topol->nrows();
489 
490  // full detector thickness
492 
493  // The index converter is only needed when inefficiencies or misscalibration
494  // are simulated.
495  if((pixelInefficiency>0) || doMissCalibrate ) { // Init pixel indices
497  }
498 
499  // Noise already defined in electrons
500  //thePixelThresholdInE = thePixelThreshold * theNoiseInElectrons ;
501  // Find the threshold in noise units, needed for the noiser.
502 
503  unsigned int Sub_detid=DetId(detID).subdetId();
504 
505  if(theNoiseInElectrons>0.){
506  if(Sub_detid == PixelSubdetector::PixelBarrel){ // Barrel modules
507  if(addThresholdSmearing) {
508  thePixelThresholdInE = smearedThreshold_BPix_->fire(); // gaussian smearing
509  } else {
511  }
512 
514 
515  } else { // Forward disks modules
517  thePixelThresholdInE = smearedThreshold_FPix_->fire(); // gaussian smearing
518  } else {
520  }
521 
523 
524  }
525  } else {
526  thePixelThreshold = 0.;
527  }
528 
529 
530 #ifdef TP_DEBUG
531  LogDebug ("PixelDigitizer")
532  << " PixelDigitizer "
533  << numColumns << " " << numRows << " " << moduleThickness;
534 #endif
535 
536  // produce SignalPoint's for all SimHit's in detector
537  // Loop over hits
538 
539  vector<PSimHit>::const_iterator ssbegin;
540  for (ssbegin= _PixelHits.begin();ssbegin !=_PixelHits.end(); ++ssbegin) {
541 
542 #ifdef TP_DEBUG
543  LogDebug ("Pixel Digitizer")
544  << (*ssbegin).particleType() << " " << (*ssbegin).pabs() << " "
545  << (*ssbegin).energyLoss() << " " << (*ssbegin).tof() << " "
546  << (*ssbegin).trackId() << " " << (*ssbegin).processType() << " "
547  << (*ssbegin).detUnitId()
548  << (*ssbegin).entryPoint() << " " << (*ssbegin).exitPoint() ;
549 #endif
550 
551  _collection_points.clear(); // Clear the container
552  // fill _collection_points for this SimHit, indpendent of topology
553  // Check the TOF cut
554  //if (std::abs( (*ssbegin).tof() )<theTofCut){ // old cut
555  if ( ((*ssbegin).tof() >= theTofLowerCut) && ((*ssbegin).tof() <= theTofUpperCut) ) {
556  primary_ionization(*ssbegin); // fills _ionization_points
557  drift(*ssbegin); // transforms _ionization_points to _collection_points
558  // compute induced signal on readout elements and add to _signal
559  induce_signal(*ssbegin); // *ihit needed only for SimHit<-->Digi link
560  } // end if
561  } // end for
562 
563  if(addNoise) add_noise(); // generate noise
564  // Do only if needed
565 
566  if((pixelInefficiency>0) && (_signal.size()>0))
567  pixel_inefficiency(); // Kill some pixels
568 
569  if(use_ineff_from_db_ && (_signal.size()>0))
571 
572  delete pIndexConverter;
573 
574  if(use_module_killing_ && use_deadmodule_DB_) // remove dead modules using DB
576 
577  if(use_module_killing_ && !use_deadmodule_DB_) // remove dead modules using the list in cfg file
579 
580  }
581 
582  make_digis();
583 
584  return internal_coll;
585 }
#define LogDebug(id)
virtual int ncolumns() const =0
virtual int nrows() const =0
virtual float thickness() const =0
virtual const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
const Bounds & bounds() const
Definition: BoundSurface.h:89
std::vector< PixelDigi > internal_coll
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
CLHEP::RandGaussQ * smearedThreshold_FPix_
CLHEP::RandGaussQ * smearedThreshold_BPix_
void primary_ionization(const PSimHit &hit)
std::vector< SignalPoint > _collection_points
void induce_signal(const PSimHit &hit)
void SiPixelDigitizerAlgorithm::drift ( const PSimHit hit)
private

Definition at line 717 of file SiPixelDigitizerAlgorithm.cc.

References _collection_points, _ionization_points, alpha2Order, Dist300, DriftDirection(), i, LogDebug, moduleThickness, FitTarget::Sigma, Sigma0, mathSSE::sqrt(), PSimHit::tof(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by digitize().

717  {
718 
719 
720 #ifdef TP_DEBUG
721  LogDebug ("Pixel Digitizer") << " enter drift " ;
722 #endif
723 
724  _collection_points.resize( _ionization_points.size()); // set size
725 
726  LocalVector driftDir=DriftDirection(); // get the charge drift direction
727  if(driftDir.z() ==0.) {
728  LogWarning("Magnetic field") << " pxlx: drift in z is zero ";
729  return;
730  }
731 
732  // tangent of Lorentz angle
733  //float TanLorenzAngleX = driftDir.x()/driftDir.z();
734  //float TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
735 
736  float TanLorenzAngleX, TanLorenzAngleY,dir_z, CosLorenzAngleX,
737  CosLorenzAngleY;
738  if ( alpha2Order) {
739 
740  TanLorenzAngleX = driftDir.x(); // tangen of Lorentz angle
741  TanLorenzAngleY = driftDir.y();
742  dir_z = driftDir.z(); // The z drift direction
743  CosLorenzAngleX = 1./sqrt(1.+TanLorenzAngleX*TanLorenzAngleX); //cosine
744  CosLorenzAngleY = 1./sqrt(1.+TanLorenzAngleY*TanLorenzAngleY); //cosine;
745 
746  } else{
747 
748  TanLorenzAngleX = driftDir.x();
749  TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
750  dir_z = driftDir.z(); // The z drift direction
751  CosLorenzAngleX = 1./sqrt(1.+TanLorenzAngleX*TanLorenzAngleX); //cosine to estimate the path length
752  CosLorenzAngleY = 1.;
753  }
754 
755 
756 #ifdef TP_DEBUG
757  LogDebug ("Pixel Digitizer")
758  << " Lorentz Tan " << TanLorenzAngleX << " " << TanLorenzAngleY <<" "
759  << CosLorenzAngleX << " " << CosLorenzAngleY << " "
760  << moduleThickness*TanLorenzAngleX << " " << driftDir;
761 #endif
762 
763  float Sigma_x = 1.; // Charge spread
764  float Sigma_y = 1.;
765  float DriftDistance; // Distance between charge generation and collection
766  float DriftLength; // Actual Drift Lentgh
767  float Sigma;
768 
769 
770  for (unsigned int i = 0; i != _ionization_points.size(); i++) {
771 
772  float SegX, SegY, SegZ; // position
773  SegX = _ionization_points[i].x();
774  SegY = _ionization_points[i].y();
775  SegZ = _ionization_points[i].z();
776 
777  // Distance from the collection plane
778  //DriftDistance = (moduleThickness/2. + SegZ); // Drift to -z
779  // Include explixitely the E drift direction (for CMS dir_z=-1)
780  DriftDistance = moduleThickness/2. - (dir_z * SegZ); // Drift to -z
781 
782  //if( DriftDistance <= 0.)
783  //cout<<" <=0 "<<DriftDistance<<" "<<i<<" "<<SegZ<<" "<<dir_z<<" "
784  // <<SegX<<" "<<SegY<<" "<<(moduleThickness/2)<<" "
785  // <<_ionization_points[i].energy()<<" "
786  // <<hit.particleType()<<" "<<hit.pabs()<<" "<<hit.energyLoss()<<" "
787  // <<hit.entryPoint()<<" "<<hit.exitPoint()
788  // <<endl;
789 
790  if( DriftDistance < 0.) {
791  DriftDistance = 0.;
792  } else if ( DriftDistance > moduleThickness )
793  DriftDistance = moduleThickness;
794 
795  // Assume full depletion now, partial depletion will come later.
796  float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
797  float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
798 
799  // Shift cloud center
800  float CloudCenterX = SegX + XDriftDueToMagField;
801  float CloudCenterY = SegY + YDriftDueToMagField;
802 
803  // Calculate how long is the charge drift path
804  DriftLength = sqrt( DriftDistance*DriftDistance +
805  XDriftDueToMagField*XDriftDueToMagField +
806  YDriftDueToMagField*YDriftDueToMagField );
807 
808  // What is the charge diffusion after this path
809  Sigma = sqrt(DriftLength/Dist300) * Sigma0;
810 
811  // Project the diffusion sigma on the collection plane
812  Sigma_x = Sigma / CosLorenzAngleX ;
813  Sigma_y = Sigma / CosLorenzAngleY ;
814 
815  SignalPoint sp( CloudCenterX, CloudCenterY,
816  Sigma_x, Sigma_y, hit.tof(), _ionization_points[i].energy() );
817 
818  // Load the Charge distribution parameters
819  _collection_points[i] = (sp);
820 
821  } // loop over ionization points, i.
822 
823 } // end drift
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:72
T y() const
Definition: PV3DBase.h:57
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
static const char * Sigma
Definition: FitHist_fwd.h:8
std::vector< EnergyDepositUnit > _ionization_points
std::vector< SignalPoint > _collection_points
T x() const
Definition: PV3DBase.h:56
LocalVector SiPixelDigitizerAlgorithm::DriftDirection ( )
private

Definition at line 1445 of file SiPixelDigitizerAlgorithm.cc.

References _bfield, _detp, alpha2Order, detID, LogDebug, PixelSubdetector::PixelBarrel, GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), SiPixelLorentzAngle_, DetId::subdetId(), GeomDet::surface(), tanLorentzAnglePerTesla_BPix, tanLorentzAnglePerTesla_FPix, and use_LorentzAngle_DB_.

Referenced by drift().

1445  {
1446  Frame detFrame(_detp->surface().position(),_detp->surface().rotation());
1447  LocalVector Bfield=detFrame.toLocal(_bfield);
1448 
1449  float alpha2_FPix;
1450  float alpha2_BPix;
1451  float alpha2;
1452 
1453  //float dir_x = -tanLorentzAnglePerTesla * Bfield.y();
1454  //float dir_y = +tanLorentzAnglePerTesla * Bfield.x();
1455  //float dir_z = -1.; // E field always in z direction, so electrons go to -z
1456  // The dir_z has to be +/- 1. !
1457  // LocalVector theDriftDirection = LocalVector(dir_x,dir_y,dir_z);
1458 
1459  float dir_x = 0.0;
1460  float dir_y = 0.0;
1461  float dir_z = 0.0;
1462  float scale = 0.0;
1463 
1464  unsigned int Sub_detid=DetId(detID).subdetId();
1465 
1466  // Read Lorentz angle from cfg file:**************************************************************
1467 
1468  if(!use_LorentzAngle_DB_){
1469 
1470  if ( alpha2Order) {
1473  }else {
1474  alpha2_FPix = 0.0;
1475  alpha2_BPix = 0.0;
1476  }
1477 
1478  if (Sub_detid == PixelSubdetector::PixelBarrel){// barrel layers
1479  dir_x = -( tanLorentzAnglePerTesla_BPix * Bfield.y() + alpha2_BPix* Bfield.z()* Bfield.x() );
1480  dir_y = +( tanLorentzAnglePerTesla_BPix * Bfield.x() - alpha2_BPix* Bfield.z()* Bfield.y() );
1481  dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1482  scale = (1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1483 
1484  } else {// forward disks
1485  dir_x = -( tanLorentzAnglePerTesla_FPix * Bfield.y() + alpha2_FPix* Bfield.z()* Bfield.x() );
1486  dir_y = +( tanLorentzAnglePerTesla_FPix * Bfield.x() - alpha2_FPix* Bfield.z()* Bfield.y() );
1487  dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1488  scale = (1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1489  }
1490  } // end: Read LA from cfg file.
1491 
1492  //Read Lorentz angle from DB:********************************************************************
1493  if(use_LorentzAngle_DB_){
1494  std::map<unsigned int,float> detid_la= SiPixelLorentzAngle_->getLorentzAngles();
1495  std::map<unsigned int,float>::const_iterator it;
1496 
1497 
1498  for (it=detid_la.begin();it!=detid_la.end();it++)
1499  {
1500  if (detID==it->first) {
1501  if (alpha2Order) {
1502  alpha2 = it->second * it->second;
1503  }
1504  else {
1505  alpha2 = 0.0;
1506  }
1507  // std::cout << "detID is: " << it->first << "The LA per tesla is: " << it->second << std::endl;
1508  dir_x = -( it->second * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
1509  dir_y = +( it->second * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
1510  dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
1511  scale = (1 + alpha2 * Bfield.z()*Bfield.z() );
1512  }
1513  }
1514  }// end: Read LA from DataBase.
1515 
1516  LocalVector theDriftDirection = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale );
1517 
1518 #ifdef TP_DEBUG
1519  LogDebug ("Pixel Digitizer") << " The drift direction in local coordinate is "
1520  << theDriftDirection ;
1521 #endif
1522 
1523  return theDriftDirection;
1524 }
#define LogDebug(id)
Local3DVector LocalVector
Definition: LocalVector.h:12
const PixelGeomDetUnit * _detp
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
Definition: DetId.h:20
GloballyPositioned< double > Frame
const RotationType & rotation() const
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
void SiPixelDigitizerAlgorithm::fillDeadModules ( const edm::EventSetup es)

Definition at line 109 of file SiPixelDigitizerAlgorithm.cc.

References edm::EventSetup::get().

109  {
110  if(!use_deadmodule_DB_){
111  DeadModules = conf_.getParameter<Parameters>("DeadModules"); // get dead module from cfg file
112  }
113  else{ // Get dead module from DB record
114  // ESHandle was defined in the header file edm::ESHandle<SiPixelQuality> SiPixelBadModule_;
116  }
117 }
T getParameter(std::string const &) const
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
const T & get() const
Definition: EventSetup.h:55
std::vector< edm::ParameterSet > Parameters
void SiPixelDigitizerAlgorithm::fillLorentzAngle ( const edm::EventSetup es)

Definition at line 119 of file SiPixelDigitizerAlgorithm.cc.

References edm::EventSetup::get().

119  {
121  // Get the Lorentz angle from the cfg file:
122  tanLorentzAnglePerTesla_FPix=conf_.getParameter<double>("TanLorentzAnglePerTesla_FPix");
123  tanLorentzAnglePerTesla_BPix=conf_.getParameter<double>("TanLorentzAnglePerTesla_BPix");
124  }
125  else {
126  // Get Lorentz angle from DB record
127  // ESHandle was defined in the header file edm::ESHandle<SiPixelLorentzAngle> SiPixelLorentzAngle_;
129  }
130 }
T getParameter(std::string const &) const
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
const T & get() const
Definition: EventSetup.h:55
void SiPixelDigitizerAlgorithm::fillMapandGeom ( const edm::EventSetup es)

Definition at line 133 of file SiPixelDigitizerAlgorithm.cc.

References edm::EventSetup::get().

133  {
134  es.get<SiPixelFedCablingMapRcd>().get(map_);
136 }
edm::ESHandle< SiPixelFedCablingMap > map_
edm::ESHandle< TrackerGeometry > geom_
const T & get() const
Definition: EventSetup.h:55
void SiPixelDigitizerAlgorithm::fluctuateEloss ( int  particleId,
float  momentum,
float  eloss,
float  length,
int  NumberOfSegments,
float  elossVector[] 
)
private

Definition at line 662 of file SiPixelDigitizerAlgorithm.cc.

References abs, fluctuate, i, SiG4UniversalFluctuation::SampleFluctuations(), and tMax.

Referenced by primary_ionization().

664  {
665 
666  // Get dedx for this track
667  float dedx;
668  if( length > 0.) dedx = eloss/length;
669  else dedx = eloss;
670 
671  double particleMass = 139.6; // Mass in MeV, Assume pion
672  pid = abs(pid);
673  if(pid!=211) { // Mass in MeV
674  if(pid==11) particleMass = 0.511;
675  else if(pid==13) particleMass = 105.7;
676  else if(pid==321) particleMass = 493.7;
677  else if(pid==2212) particleMass = 938.3;
678  }
679  // What is the track segment length.
680  float segmentLength = length/NumberOfSegs;
681 
682  // Generate charge fluctuations.
683  float de=0.;
684  float sum=0.;
685  double segmentEloss = (1000.*eloss)/NumberOfSegs; //eloss in MeV
686  for (int i=0;i<NumberOfSegs;i++) {
687  // material,*, momentum,energy,*, *, mass
688  //myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
689  // The G4 routine needs momentum in MeV, mass in Mev, delta-cut in MeV,
690  // track segment length in mm, segment eloss in MeV
691  // Returns fluctuated eloss in MeV
692  double deltaCutoff = tMax; // the cutoff is sometimes redefined inside, so fix it.
693  de = fluctuate->SampleFluctuations(double(particleMomentum*1000.),
694  particleMass, deltaCutoff,
695  double(segmentLength*10.),
696  segmentEloss )/1000.; //convert to GeV
697 
698  elossVector[i]=de;
699  sum +=de;
700  }
701 
702  if(sum>0.) { // If fluctuations give eloss>0.
703  // Rescale to the same total eloss
704  float ratio = eloss/sum;
705 
706  for (int ii=0;ii<NumberOfSegs;ii++) elossVector[ii]= ratio*elossVector[ii];
707  } else { // If fluctuations gives 0 eloss
708  float averageEloss = eloss/NumberOfSegs;
709  for (int ii=0;ii<NumberOfSegs;ii++) elossVector[ii]= averageEloss;
710  }
711  return;
712 }
int i
Definition: DBlmapReader.cc:9
SiG4UniversalFluctuation * fluctuate
#define abs(x)
Definition: mlp_lapack.h:159
double SampleFluctuations(const double momentum, const double mass, double &tmax, const double length, const double meanLoss)
void SiPixelDigitizerAlgorithm::induce_signal ( const PSimHit hit)
private

Definition at line 827 of file SiPixelDigitizerAlgorithm.cc.

References _collection_points, _signal, Topology::channel(), PixelDigi::channelToPixel(), ClusterWidth, i, Topology::localPosition(), LogDebug, Topology::measurementPosition(), numColumns, numRows, PixelTopology::pitch(), PixelDigi::pixelToChannel(), query::result, ntuplemaker::status, topol, x, PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), detailsBasic3DVector::y, PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by digitize().

827  {
828 
829  // X - Rows, Left-Right, 160, (1.6cm) for barrel
830  // Y - Columns, Down-Up, 416, (6.4cm)
831 
832 #ifdef TP_DEBUG
833  LogDebug ("Pixel Digitizer")
834  << " enter induce_signal, "
835  << topol->pitch().first << " " << topol->pitch().second; //OK
836 #endif
837 
838  // local map to store pixels hit by 1 Hit.
839  typedef map< int, float, less<int> > hit_map_type;
840  hit_map_type hit_signal;
841 
842  // map to store pixel integrals in the x and in the y directions
843  map<int, float, less<int> > x,y;
844 
845  // Assign signals to readout channels and store sorted by channel number
846 
847  // Iterate over collection points on the collection plane
848  for ( vector<SignalPoint>::const_iterator i=_collection_points.begin();
849  i != _collection_points.end(); i++) {
850 
851  float CloudCenterX = i->position().x(); // Charge position in x
852  float CloudCenterY = i->position().y(); // in y
853  float SigmaX = i->sigma_x(); // Charge spread in x
854  float SigmaY = i->sigma_y(); // in y
855  float Charge = i->amplitude(); // Charge amplitude
856 
857 
858  //if(SigmaX==0 || SigmaY==0) {
859  //cout<<SigmaX<<" "<<SigmaY
860  // << " cloud " << i->position().x() << " " << i->position().y() << " "
861  // << i->sigma_x() << " " << i->sigma_y() << " " << i->amplitude()<<endl;
862  //}
863 
864 #ifdef TP_DEBUG
865  LogDebug ("Pixel Digitizer")
866  << " cloud " << i->position().x() << " " << i->position().y() << " "
867  << i->sigma_x() << " " << i->sigma_y() << " " << i->amplitude();
868 #endif
869 
870  // Find the maximum cloud spread in 2D plane , assume 3*sigma
871  float CloudRight = CloudCenterX + ClusterWidth*SigmaX;
872  float CloudLeft = CloudCenterX - ClusterWidth*SigmaX;
873  float CloudUp = CloudCenterY + ClusterWidth*SigmaY;
874  float CloudDown = CloudCenterY - ClusterWidth*SigmaY;
875 
876  // Define 2D cloud limit points
877  LocalPoint PointRightUp = LocalPoint(CloudRight,CloudUp);
878  LocalPoint PointLeftDown = LocalPoint(CloudLeft,CloudDown);
879 
880  // This points can be located outside the sensor area.
881  // The conversion to measurement point does not check for that
882  // so the returned pixel index might be wrong (outside range).
883  // We rely on the limits check below to fix this.
884  // But remember whatever we do here THE CHARGE OUTSIDE THE ACTIVE
885  // PIXEL ARE IS LOST, it should not be collected.
886 
887  // Convert the 2D points to pixel indices
888  MeasurementPoint mp = topol->measurementPosition(PointRightUp ); //OK
889 
890  int IPixRightUpX = int( floor( mp.x()));
891  int IPixRightUpY = int( floor( mp.y()));
892 
893 #ifdef TP_DEBUG
894  LogDebug ("Pixel Digitizer") << " right-up " << PointRightUp << " "
895  << mp.x() << " " << mp.y() << " "
896  << IPixRightUpX << " " << IPixRightUpY ;
897 #endif
898 
899  mp = topol->measurementPosition(PointLeftDown ); //OK
900 
901  int IPixLeftDownX = int( floor( mp.x()));
902  int IPixLeftDownY = int( floor( mp.y()));
903 
904 #ifdef TP_DEBUG
905  LogDebug ("Pixel Digitizer") << " left-down " << PointLeftDown << " "
906  << mp.x() << " " << mp.y() << " "
907  << IPixLeftDownX << " " << IPixLeftDownY ;
908 #endif
909 
910  // Check detector limits to correct for pixels outside range.
911  IPixRightUpX = numRows>IPixRightUpX ? IPixRightUpX : numRows-1 ;
912  IPixRightUpY = numColumns>IPixRightUpY ? IPixRightUpY : numColumns-1 ;
913  IPixLeftDownX = 0<IPixLeftDownX ? IPixLeftDownX : 0 ;
914  IPixLeftDownY = 0<IPixLeftDownY ? IPixLeftDownY : 0 ;
915 
916  x.clear(); // clear temporary integration array
917  y.clear();
918 
919  // First integrate cahrge strips in x
920  int ix; // TT for compatibility
921  for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) { // loop over x index
922  float xUB, xLB, UpperBound, LowerBound;
923 
924  // Why is set to 0 if ix=0, does it meen that we accept charge
925  // outside the sensor? CHeck How it was done in ORCA?
926  //if (ix == 0) LowerBound = 0.;
927  if (ix == 0 || SigmaX==0. ) // skip for surface segemnts
928  LowerBound = 0.;
929  else {
930  mp = MeasurementPoint( float(ix), 0.0);
931  xLB = topol->localPosition(mp).x();
932  gsl_sf_result result;
933  int status = gsl_sf_erf_Q_e( (xLB-CloudCenterX)/SigmaX, &result);
934  if (status != 0)
935  LogWarning ("Integration")<<"could not compute gaussian probability";
936  LowerBound = 1-result.val;
937  }
938 
939  if (ix == numRows-1 || SigmaX==0. )
940  UpperBound = 1.;
941  else {
942  mp = MeasurementPoint( float(ix+1), 0.0);
943  xUB = topol->localPosition(mp).x();
944  gsl_sf_result result;
945  int status = gsl_sf_erf_Q_e( (xUB-CloudCenterX)/SigmaX, &result);
946  if (status != 0)
947  LogWarning ("Integration")<<"could not compute gaussian probability";
948  UpperBound = 1. - result.val;
949  }
950 
951  float TotalIntegrationRange = UpperBound - LowerBound; // get strip
952  x[ix] = TotalIntegrationRange; // save strip integral
953  //if(SigmaX==0 || SigmaY==0)
954  //cout<<TotalIntegrationRange<<" "<<ix<<endl;
955 
956  }
957 
958  // Now integarte strips in y
959  int iy; // TT for compatibility
960  for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) { //loope over y ind
961  float yUB, yLB, UpperBound, LowerBound;
962 
963  if (iy == 0 || SigmaY==0.)
964  LowerBound = 0.;
965  else {
966  mp = MeasurementPoint( 0.0, float(iy) );
967  yLB = topol->localPosition(mp).y();
968  gsl_sf_result result;
969  int status = gsl_sf_erf_Q_e( (yLB-CloudCenterY)/SigmaY, &result);
970  if (status != 0)
971  LogWarning ("Integration")<<"could not compute gaussian probability";
972  LowerBound = 1. - result.val;
973  }
974 
975  if (iy == numColumns-1 || SigmaY==0. )
976  UpperBound = 1.;
977  else {
978  mp = MeasurementPoint( 0.0, float(iy+1) );
979  yUB = topol->localPosition(mp).y();
980  gsl_sf_result result;
981  int status = gsl_sf_erf_Q_e( (yUB-CloudCenterY)/SigmaY, &result);
982  if (status != 0)
983  LogWarning ("Integration")<<"could not compute gaussian probability";
984  UpperBound = 1. - result.val;
985  }
986 
987  float TotalIntegrationRange = UpperBound - LowerBound;
988  y[iy] = TotalIntegrationRange; // save strip integral
989  //if(SigmaX==0 || SigmaY==0)
990  //cout<<TotalIntegrationRange<<" "<<iy<<endl;
991  }
992 
993  // Get the 2D charge integrals by folding x and y strips
994  int chan;
995  for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) { // loop over x index
996  for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) { //loope over y ind
997 
998  float ChargeFraction = Charge*x[ix]*y[iy];
999 
1000  if( ChargeFraction > 0. ) {
1001  chan = PixelDigi::pixelToChannel( ix, iy); // Get index
1002  // Load the amplitude
1003  hit_signal[chan] += ChargeFraction;
1004  } // endif
1005 
1006 
1007  mp = MeasurementPoint( float(ix), float(iy) );
1008  LocalPoint lp = topol->localPosition(mp);
1009  chan = topol->channel(lp);
1010 
1011 #ifdef TP_DEBUG
1012  LogDebug ("Pixel Digitizer")
1013  << " pixel " << ix << " " << iy << " - "<<" "
1014  << chan << " " << ChargeFraction<<" "
1015  << mp.x() << " " << mp.y() <<" "
1016  << lp.x() << " " << lp.y() << " " // givex edge position
1017  << chan; // edge belongs to previous ?
1018 #endif
1019 
1020  } // endfor iy
1021  } //endfor ix
1022 
1023 
1024  // Test conversions (THIS IS FOR TESTING ONLY) comment-out.
1025  // mp = topol->measurementPosition( i->position() ); //OK
1026  // LocalPoint lp = topol->localPosition(mp); //OK
1027  // pair<float,float> p = topol->pixel( i->position() ); //OK
1028  // chan = PixelDigi::pixelToChannel( int(p.first), int(p.second));
1029  // pair<int,int> ip = PixelDigi::channelToPixel(chan);
1030  // MeasurementPoint mp1 = MeasurementPoint( float(ip.first),
1031  // float(ip.second) );
1032  // LogDebug ("Pixel Digitizer") << " Test "<< mp.x() << " " << mp.y()
1033  // << " "<< lp.x() << " " << lp.y() << " "<<" "
1034  // <<p.first <<" "<<p.second<<" "<<chan<< " "
1035  // <<" " << ip.first << " " << ip.second << " "
1036  // << mp1.x() << " " << mp1.y() << " " //OK
1037  // << topol->localPosition(mp1).x() << " " //OK
1038  // << topol->localPosition(mp1).y() << " "
1039  // << topol->channel( i->position() ); //OK
1040 
1041 
1042  } // loop over charge distributions
1043 
1044  // Fill the global map with all hit pixels from this event
1045 
1046  for ( hit_map_type::const_iterator im = hit_signal.begin();
1047  im != hit_signal.end(); im++) {
1048  _signal[(*im).first] += Amplitude( (*im).second, &hit, (*im).second);
1049 
1050  int chan = (*im).first;
1051  pair<int,int> ip = PixelDigi::channelToPixel(chan);
1052 
1053 #ifdef TP_DEBUG
1054  LogDebug ("Pixel Digitizer")
1055  << " pixel " << ip.first << " " << ip.second << " "
1056  << _signal[(*im).first];
1057 #endif
1058  }
1059 
1060 } // end induce_signal
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
T y() const
Definition: PV2DBase.h:40
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T y() const
Definition: PV3DBase.h:57
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:47
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
tuple result
Definition: query.py:137
virtual int channel(const LocalPoint &p) const =0
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual std::pair< float, float > pitch() const =0
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:41
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
Definition: DDAxes.h:10
tuple status
Definition: ntuplemaker.py:245
std::vector< SignalPoint > _collection_points
T x() const
Definition: PV2DBase.h:39
T x() const
Definition: PV3DBase.h:56
void SiPixelDigitizerAlgorithm::init ( const edm::EventSetup es)

Definition at line 96 of file SiPixelDigitizerAlgorithm.cc.

Referenced by cms::SiPixelDigitizer::produce().

96  {
97  if(use_ineff_from_db_){// load gain calibration service fromdb...
100  }
101 
102  fillDeadModules(es); // gets the dead module from config file or DB.
103  fillLorentzAngle(es); // gets the Lorentz angle from the config file or DB.
104  fillMapandGeom(es); //gets the map and geometry from the DB (to kill ROCs)
105 }
SiPixelGainCalibrationOfflineSimService * theSiPixelGainCalibrationService_
void fillDeadModules(const edm::EventSetup &es)
void fillLorentzAngle(const edm::EventSetup &es)
void fillMapandGeom(const edm::EventSetup &es)
void SiPixelDigitizerAlgorithm::make_digis ( )
private

Definition at line 1065 of file SiPixelDigitizerAlgorithm.cc.

References _signal, ecalMGPA::adc(), PixelDigi::channelToPixel(), doMissCalibrate, i, internal_coll, link_coll, LogDebug, min, missCalibrate(), simi, theAdcFullScale, theElectronPerADC, thePixelThresholdInE, theThresholdInE_BPix, and theThresholdInE_FPix.

Referenced by digitize().

1065  {
1066  internal_coll.reserve(50); internal_coll.clear();
1067 
1068 #ifdef TP_DEBUG
1069  LogDebug ("Pixel Digitizer") << " make digis "<<" "
1070  << " pixel threshold FPix" << theThresholdInE_FPix << " "
1071  << " pixel threshold BPix" << theThresholdInE_BPix << " "
1072  << " List pixels passing threshold ";
1073 #endif
1074 
1075  // Loop over hit pixels
1076 
1077  for ( signal_map_iterator i = _signal.begin(); i != _signal.end(); i++) {
1078 
1079  float signalInElectrons = (*i).second ; // signal in electrons
1080 
1081  // Do the miss calibration for calibration studies only.
1082  //if(doMissCalibrate) signalInElectrons = missCalibrate(signalInElectrons)
1083 
1084  // Do only for pixels above threshold
1085 
1086  if ( signalInElectrons >= thePixelThresholdInE) { // check threshold
1087 
1088  int chan = (*i).first; // channel number
1089  pair<int,int> ip = PixelDigi::channelToPixel(chan);
1090  int adc=0; // ADC count as integer
1091 
1092  // Do the miss calibration for calibration studies only.
1093  if(doMissCalibrate) {
1094  int row = ip.first; // X in row
1095  int col = ip.second; // Y is in col
1096  adc = int(missCalibrate(col,row,signalInElectrons)); //full misscalib.
1097  } else { // Just do a simple electron->adc conversion
1098  adc = int( signalInElectrons / theElectronPerADC ); // calibrate gain
1099  }
1100  adc = min(adc, theAdcFullScale); // Check maximum value
1101 
1102 #ifdef TP_DEBUG
1103  LogDebug ("Pixel Digitizer")
1104  << (*i).first << " " << (*i).second << " " << signalInElectrons
1105  << " " << adc << ip.first << " " << ip.second ;
1106 #endif
1107 
1108  // Load digis
1109  internal_coll.push_back( PixelDigi( ip.first, ip.second, adc));
1110 
1111  //digilink
1112  if((*i).second.hits().size()>0){
1113  simi.clear();
1114  unsigned int il=0;
1115  for( vector<const PSimHit*>::const_iterator ihit = (*i).second.hits().begin();
1116  ihit != (*i).second.hits().end(); ihit++) {
1117  simi[(**ihit).trackId()].push_back((*i).second.individualampl()[il]);
1118  il++;
1119  }
1120 
1121  //sum the contribution of the same trackid
1122  for( simlink_map::iterator simiiter=simi.begin();
1123  simiiter!=simi.end();
1124  simiiter++){
1125 
1126  float sum_samechannel=0;
1127  for (unsigned int iii=0;iii<(*simiiter).second.size();iii++){
1128  sum_samechannel+=(*simiiter).second[iii];
1129  }
1130  float fraction=sum_samechannel/(*i).second;
1131  if (fraction>1.) fraction=1.;
1132  link_coll.push_back(PixelDigiSimLink((*i).first,(*simiiter).first,((*i).second.hits().front())->eventId(),fraction));
1133  }
1134 
1135  }
1136  }
1137 
1138  }
1139 }
int adc(sample_type sample)
get the ADC sample (12 bits)
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
std::vector< PixelDigiSimLink > link_coll
signal_map_type::iterator signal_map_iterator
std::vector< PixelDigi > internal_coll
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:41
float missCalibrate(int col, int row, float amp) const
std::vector<PixelDigiSimLink> SiPixelDigitizerAlgorithm::make_link ( )
inline

Definition at line 70 of file SiPixelDigitizerAlgorithm.h.

References link_coll.

Referenced by cms::SiPixelDigitizer::produce().

70  {
71  return link_coll; }
std::vector< PixelDigiSimLink > link_coll
float SiPixelDigitizerAlgorithm::missCalibrate ( int  col,
int  row,
float  amp 
) const
private

Definition at line 1363 of file SiPixelDigitizerAlgorithm.cc.

References BPix_p0, BPix_p1, BPix_p2, BPix_p3, detID, electronsPerVCAL, electronsPerVCAL_Offset, FPix_p0, FPix_p1, FPix_p2, FPix_p3, p1, p2, p3, PixelSubdetector::PixelBarrel, and DetId::subdetId().

Referenced by make_digis().

1364  {
1365 
1366  // Central values
1367  //const float p0=0.00352, p1=0.868, p2=112., p3=113.; // pix(0,0,0)
1368  // const float p0=0.00382, p1=0.886, p2=112.7, p3=113.0; // average roc=0
1369  //const float p0=0.00492, p1=1.998, p2=90.6, p3=134.1; // average roc=6
1370  // Smeared (rms)
1371  //const float s0=0.00020, s1=0.051, s2=5.4, s3=4.4; // average roc=0
1372  //const float s0=0.00015, s1=0.043, s2=3.2, s3=3.1; // col average roc=0
1373 
1374  // Make 2 sets of parameters for Fpix and BPIx:
1375 
1376  float p0=0.0;
1377  float p1=0.0;
1378  float p2=0.0;
1379  float p3=0.0;
1380 
1381  unsigned int Sub_detid=DetId(detID).subdetId();
1382 
1383  if (Sub_detid == PixelSubdetector::PixelBarrel){// barrel layers
1384  p0 = BPix_p0;
1385  p1 = BPix_p1;
1386  p2 = BPix_p2;
1387  p3 = BPix_p3;
1388  } else {// forward disks
1389  p0 = FPix_p0;
1390  p1 = FPix_p1;
1391  p2 = FPix_p2;
1392  p3 = FPix_p3;
1393  }
1394 
1395  // const float electronsPerVCAL = 65.5; // our present VCAL calibration (feb 2009)
1396  // const float electronsPerVCAL_Offset = -414.0; // our present VCAL calibration (feb 2009)
1397  float newAmp = 0.; //Modified signal
1398 
1399  // Convert electrons to VCAL units
1400  float signal = (signalInElectrons-electronsPerVCAL_Offset)/electronsPerVCAL;
1401 
1402  // Simulate the analog response with fixed parametrization
1403  newAmp = p3 + p2 * tanh(p0*signal - p1);
1404 
1405 
1406  // Use the pixel-by-pixel calibrations
1407  //transform to ROC index coordinates
1408  //int chipIndex=0, colROC=0, rowROC=0;
1409  //pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1410 
1411  // Use calibration from a file
1412  //int chanROC = PixelIndices::pixelToChannelROC(rowROC,colROC); // use ROC coordinates
1413  //float pp0=0, pp1=0,pp2=0,pp3=0;
1414  //map<int,CalParameters,less<int> >::const_iterator it=calmap.find(chanROC);
1415  //CalParameters y = (*it).second;
1416  //pp0 = y.p0;
1417  //pp1 = y.p1;
1418  //pp2 = y.p2;
1419  //pp3 = y.p3;
1420 
1421  //
1422  // Use random smearing
1423  // Randomize the pixel response
1424  //float pp0 = RandGaussQ::shoot(p0,s0);
1425  //float pp1 = RandGaussQ::shoot(p1,s1);
1426  //float pp2 = RandGaussQ::shoot(p2,s2);
1427  //float pp3 = RandGaussQ::shoot(p3,s3);
1428 
1429  //newAmp = pp3 + pp2 * tanh(pp0*signal - pp1); // Final signal
1430 
1431  //cout<<" misscalibrate "<<col<<" "<<row<<" "<<chipIndex<<" "<<colROC<<" "
1432  // <<rowROC<<" "<<signalInElectrons<<" "<<signal<<" "<<newAmp<<" "
1433  // <<(signalInElectrons/theElectronPerADC)<<endl;
1434 
1435  return newAmp;
1436 }
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
double p2[4]
Definition: TauolaWrapper.h:90
Definition: DetId.h:20
double p1[4]
Definition: TauolaWrapper.h:89
double p3[4]
Definition: TauolaWrapper.h:91
void SiPixelDigitizerAlgorithm::module_killing_conf ( void  )
private

Definition at line 1552 of file SiPixelDigitizerAlgorithm.cc.

References _signal, PixelDigi::channelToPixel(), DeadModules, cond::rpcobgas::detid, detID, i, Module, and use_module_killing_.

Referenced by digitize().

1552  {
1553  if(!use_module_killing_)
1554  return;
1555 
1556  bool isbad=false;
1557  int detid = detID;
1558 
1559  Parameters::iterator itDeadModules=DeadModules.begin();
1560 
1561  for(; itDeadModules != DeadModules.end(); ++itDeadModules){
1562  int Dead_detID = itDeadModules->getParameter<int>("Dead_detID");
1563  if(detid==Dead_detID){
1564  isbad=true;
1565  break;
1566  }
1567  }
1568 
1569  if(!isbad)
1570  return;
1571 
1572  std::string Module = itDeadModules->getParameter<std::string>("Module");
1573 
1574  if(Module=="whole"){
1575  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1576  i->second.set(0.); // reset amplitude
1577  }
1578  }
1579 
1580  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1581  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1582 
1583  if(Module=="tbmA" && ip.first>=80 && ip.first<=159){
1584  i->second.set(0.);
1585  }
1586 
1587  if( Module=="tbmB" && ip.first<=79){
1588  i->second.set(0.);
1589 
1590  }
1591 
1592  }
1593 }
int i
Definition: DBlmapReader.cc:9
#define Module(md)
Definition: vmac.h:202
signal_map_type::iterator signal_map_iterator
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:41
void SiPixelDigitizerAlgorithm::module_killing_DB ( void  )
private

Definition at line 1597 of file SiPixelDigitizerAlgorithm.cc.

References _signal, PixelDigi::channelToPixel(), cond::rpcobgas::detid, detID, SiPixelQuality::disabledModuleType::errorType, i, sipixelobjects::PixelROC::idInDetUnit(), j, map_, path(), edm::ESHandle< class >::product(), SiPixelBadModule_, sipixelobjects::PixelROC::toGlobal(), and use_module_killing_.

Referenced by digitize().

1597  {
1598  if(!use_module_killing_)
1599  return;
1600 
1601  bool isbad=false;
1602  uint32_t detid = detID;
1603 
1604  std::vector<SiPixelQuality::disabledModuleType>disabledModules = SiPixelBadModule_->getBadComponentList();
1605 
1607 
1608  for (size_t id=0;id<disabledModules.size();id++)
1609  {
1610  if(detid==disabledModules[id].DetID){
1611  isbad=true;
1612  badmodule = disabledModules[id];
1613  break;
1614  }
1615  }
1616 
1617  if(!isbad)
1618  return;
1619 
1620  if(badmodule.errorType == 0){ // this is a whole dead module.
1621 
1622  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1623  i->second.set(0.); // reset amplitude
1624  }
1625  }
1626  else { // all other module types: half-modules and single ROCs.
1627  // Get Bad ROC position:
1628  //follow the example of getBadRocPositions in CondFormats/SiPixelObjects/src/SiPixelQuality.cc
1629  std::vector<GlobalPixel> badrocpositions (0);
1630  std::pair<uint8_t, uint8_t> coord(1,1);
1631  for(unsigned int j = 0; j < 16; j++){
1632  if (SiPixelBadModule_->IsRocBad(detid, j) == true){
1633 
1634  std::vector<CablingPathToDetUnit> path = map_.product()->pathToDetUnit(detid);
1635  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
1636  for (IT it = path.begin(); it != path.end(); ++it) {
1637  const PixelROC* myroc = map_.product()->findItem(*it);
1638  if( myroc->idInDetUnit() == j) {
1639  LocalPixel::RocRowCol local = { 39, 25}; //corresponding to center of ROC row, col
1640  GlobalPixel global = myroc->toGlobal( LocalPixel(local) );
1641  badrocpositions.push_back(global);
1642  break;
1643  }
1644  }
1645  }
1646  }// end of getBadRocPositions
1647 
1648  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1649  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1650 
1651  for(std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it){
1652  // std::cout<<"getBadRocPositions, detidnumber: " << detid << "row is "<<it->row<<" col is "<<it->col<<std::endl;
1653  if(it->row==120){
1654  if((ip.first>=(it->row)-40 && ip.first<=(it->row)+39) && (ip.second>=(it->col)-25 && ip.second<=(it->col)+26)){
1655  i->second.set(0.);
1656  }
1657  }
1658  else {
1659  if((ip.first>=(it->row)-39 && ip.first<=(it->row)+40) && (ip.second>=(it->col)-25 && ip.second<=(it->col)+26)){
1660  i->second.set(0.);
1661  }
1662  }
1663  }
1664  }
1665  }
1666 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< SiPixelFedCablingMap > map_
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.cc:44
identify pixel inside single ROC
Definition: LocalPixel.h:7
int path() const
Definition: HLTadd.h:3
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:43
int j
Definition: DBlmapReader.cc:9
std::vector< LinkConnSpec >::const_iterator IT
signal_map_type::iterator signal_map_iterator
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:41
T const * product() const
Definition: ESHandle.h:62
row and collumn in ROC representation
Definition: LocalPixel.h:15
void SiPixelDigitizerAlgorithm::pixel_inefficiency ( )
private

Definition at line 1246 of file SiPixelDigitizerAlgorithm.cc.

References _signal, PixelDigi::channelToPixel(), PixelIndices::DColumn(), PixelIndices::DColumnInModule(), detID, flatDistribution_, i, PXBDetId::layer(), LogDebug, numColumns, numRows, pIndexConverter, PixelSubdetector::PixelBarrel, rand(), DetId::subdetId(), thePixelChipEfficiency, thePixelColEfficiency, thePixelEfficiency, and PixelIndices::transformToROC().

Referenced by digitize().

1246  {
1247 
1248 
1249  // Predefined efficiencies
1250  float pixelEfficiency = 1.0;
1251  float columnEfficiency = 1.0;
1252  float chipEfficiency = 1.0;
1253 
1254  // setup the chip indices conversion
1255  unsigned int Subid=DetId(detID).subdetId();
1256  if (Subid== PixelSubdetector::PixelBarrel){// barrel layers
1257  int layerIndex=PXBDetId(detID).layer();
1258  pixelEfficiency = thePixelEfficiency[layerIndex-1];
1259  columnEfficiency = thePixelColEfficiency[layerIndex-1];
1260  chipEfficiency = thePixelChipEfficiency[layerIndex-1];
1261 
1262  // This should never happen
1263  if(numColumns>416) LogWarning ("Pixel Geometry") <<" wrong columns in barrel "<<numColumns;
1264  if(numRows>160) LogWarning ("Pixel Geometry") <<" wrong rows in barrel "<<numRows;
1265 
1266  } else { // forward disks
1267 
1268  // For endcaps take same for each endcap
1269  pixelEfficiency = thePixelEfficiency[3];
1270  columnEfficiency = thePixelColEfficiency[3];
1271  chipEfficiency = thePixelChipEfficiency[3];
1272 
1273  // Sometimes the forward pixels have wrong size,
1274  // this crashes the index conversion, so exit.
1275  if(numColumns>260 || numRows>160) {
1276  if(numColumns>260) LogWarning ("Pixel Geometry") <<" wrong columns in endcaps "<<numColumns;
1277  if(numRows>160) LogWarning ("Pixel Geometry") <<" wrong rows in endcaps "<<numRows;
1278  return;
1279  }
1280  } // if barrel/forward
1281 
1282 #ifdef TP_DEBUG
1283  LogDebug ("Pixel Digitizer") << " enter pixel_inefficiency " << pixelEfficiency << " "
1284  << columnEfficiency << " " << chipEfficiency;
1285 #endif
1286 
1287  // Initilize the index converter
1288  //PixelIndices indexConverter(numColumns,numRows);
1289  int chipIndex = 0;
1290  int rowROC = 0;
1291  int colROC = 0;
1292  map<int, int, less<int> >chips, columns;
1293  map<int, int, less<int> >::iterator iter;
1294 
1295  // Find out the number of columns and rocs hits
1296  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1297  for (signal_map_iterator i = _signal.begin();i != _signal.end();i++) {
1298 
1299  int chan = i->first;
1300  pair<int,int> ip = PixelDigi::channelToPixel(chan);
1301  int row = ip.first; // X in row
1302  int col = ip.second; // Y is in col
1303  //transform to ROC index coordinates
1304  pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1305  int dColInChip = pIndexConverter->DColumn(colROC); // get ROC dcol from ROC col
1306  //dcol in mod
1307  int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1308 
1309  chips[chipIndex]++;
1310  columns[dColInDet]++;
1311  }
1312 
1313  // Delete some ROC hits.
1314  for ( iter = chips.begin(); iter != chips.end() ; iter++ ) {
1315  //float rand = RandFlat::shoot();
1316  float rand = flatDistribution_->fire();
1317  if( rand > chipEfficiency ) chips[iter->first]=0;
1318  }
1319 
1320  // Delete some Dcol hits.
1321  for ( iter = columns.begin(); iter != columns.end() ; iter++ ) {
1322  //float rand = RandFlat::shoot();
1323  float rand = flatDistribution_->fire();
1324  if( rand > columnEfficiency ) columns[iter->first]=0;
1325  }
1326 
1327  // Now loop again over pixels to kill some of them.
1328  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1329  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1330 
1331  // int chan = i->first;
1332  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1333  int row = ip.first; // X in row
1334  int col = ip.second; // Y is in col
1335  //transform to ROC index coordinates
1336  pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1337  int dColInChip = pIndexConverter->DColumn(colROC); //get ROC dcol from ROC col
1338  //dcol in mod
1339  int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1340 
1341 
1342  //float rand = RandFlat::shoot();
1343  float rand = flatDistribution_->fire();
1344  if( chips[chipIndex]==0 || columns[dColInDet]==0
1345  || rand>pixelEfficiency ) {
1346  // make pixel amplitude =0, pixel will be lost at clusterization
1347  i->second.set(0.); // reset amplitude,
1348  } // end if
1349 
1350  } // end pixel loop
1351 
1352 } // end pixel_indefficiency
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
static int DColumn(const int colROC)
Definition: PixelIndices.h:229
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
Definition: PixelIndices.h:163
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
signal_map_type::iterator signal_map_iterator
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:41
Signal rand(Signal arg)
Definition: vlib.cc:442
static int DColumnInModule(const int dcol, const int chipIndex)
Definition: PixelIndices.h:243
void SiPixelDigitizerAlgorithm::pixel_inefficiency_db ( void  )
private

Definition at line 1528 of file SiPixelDigitizerAlgorithm.cc.

References _signal, PixelDigi::channelToPixel(), cond::rpcobgas::detid, detID, i, SiPixelGainCalibrationOfflineSimService::isDead(), theSiPixelGainCalibrationService_, and use_ineff_from_db_.

Referenced by digitize().

1528  {
1529  if(!use_ineff_from_db_)
1530  return;
1531 
1532  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1533  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1534 
1535  // int chan = i->first;
1536  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1537  int row = ip.first; // X in row
1538  int col = ip.second; // Y is in col
1539  uint32_t detid = detID;
1540  //transform to ROC index coordinates
1541  if(theSiPixelGainCalibrationService_->isDead(detid, col, row)){
1542  // std::cout << "now in isdead check, row " << detid << " " << col << "," << row << std::endl;
1543  // make pixel amplitude =0, pixel will be lost at clusterization
1544  i->second.set(0.); // reset amplitude,
1545  } // end if
1546  } // end pixel loop
1547 } // end pixel_indefficiency
int i
Definition: DBlmapReader.cc:9
SiPixelGainCalibrationOfflineSimService * theSiPixelGainCalibrationService_
signal_map_type::iterator signal_map_iterator
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:41
bool isDead(const uint32_t &detID, const int &col, const int &row)
void SiPixelDigitizerAlgorithm::primary_ionization ( const PSimHit hit)
private

Definition at line 590 of file SiPixelDigitizerAlgorithm.cc.

References _ionization_points, relval_parameters_module::energy, PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::exitPoint(), fluctuateCharge, fluctuateEloss(), GeVperElectron, i, LogDebug, PV3DBase< T, PVType, FrameType >::mag(), NumberOfSegments, PSimHit::pabs(), PSimHit::particleType(), evf::utils::pid, point, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by digitize().

590  {
591 
592 // Straight line approximation for trajectory inside active media
593 
594  const float SegmentLength = 0.0010; //10microns in cm
595  float energy;
596 
597  // Get the 3D segment direction vector
598  LocalVector direction = hit.exitPoint() - hit.entryPoint();
599 
600  float eLoss = hit.energyLoss(); // Eloss in GeV
601  float length = direction.mag(); // Track length in Silicon
602 
603  NumberOfSegments = int ( length / SegmentLength); // Number of segments
605 
606 #ifdef TP_DEBUG
607  LogDebug ("Pixel Digitizer")
608  << " enter primary_ionzation " << NumberOfSegments
609  << " shift = "
610  << (hit.exitPoint().x()-hit.entryPoint().x()) << " "
611  << (hit.exitPoint().y()-hit.entryPoint().y()) << " "
612  << (hit.exitPoint().z()-hit.entryPoint().z()) << " "
613  << hit.particleType() <<" "<< hit.pabs() ;
614 #endif
615 
616  float* elossVector = new float[NumberOfSegments]; // Eloss vector
617 
618  if( fluctuateCharge ) {
619  //MP DA RIMUOVERE ASSOLUTAMENTE
620  int pid = hit.particleType();
621  //int pid=211; // assume it is a pion
622 
623  float momentum = hit.pabs();
624  // Generate fluctuated charge points
625  fluctuateEloss(pid, momentum, eLoss, length, NumberOfSegments,
626  elossVector);
627  }
628 
629  _ionization_points.resize( NumberOfSegments); // set size
630 
631  // loop over segments
632  for ( int i = 0; i != NumberOfSegments; i++) {
633  // Divide the segment into equal length subsegments
634  Local3DPoint point = hit.entryPoint() +
635  float((i+0.5)/NumberOfSegments) * direction;
636 
637  if( fluctuateCharge )
638  energy = elossVector[i]/GeVperElectron; // Convert charge to elec.
639  else
640  energy = hit.energyLoss()/GeVperElectron/float(NumberOfSegments);
641 
642  EnergyDepositUnit edu( energy, point); //define position,energy point
643  _ionization_points[i] = edu; // save
644 
645 #ifdef TP_DEBUG
646  LogDebug ("Pixel Digitizer")
647  << i << " " << _ionization_points[i].x() << " "
648  << _ionization_points[i].y() << " "
649  << _ionization_points[i].z() << " "
650  << _ionization_points[i].energy();
651 #endif
652 
653  } // end for loop
654 
655  delete[] elossVector;
656 
657 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
T y() const
Definition: PV3DBase.h:57
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[])
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
T mag() const
Definition: PV3DBase.h:61
T z() const
Definition: PV3DBase.h:58
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
std::vector< EnergyDepositUnit > _ionization_points
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
int particleType() const
Definition: PSimHit.h:85
T x() const
Definition: PV3DBase.h:56
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::DetSet< PixelDigi >::collection_type SiPixelDigitizerAlgorithm::run ( const std::vector< PSimHit > &  input,
PixelGeomDetUnit pixdet,
GlobalVector  bfield 
)

Definition at line 449 of file SiPixelDigitizerAlgorithm.cc.

References _bfield, _detp, _PixelHits, _signal, detID, digitize(), GeomDet::geographicalId(), collect_tpl::input, link_coll, LogDebug, and DetId::rawId().

Referenced by cms::SiPixelDigitizer::produce().

452  {
453 
454  _detp = pixdet; //cache the PixGeomDetUnit
455  _PixelHits=input; //cache the SimHit
456  _bfield=bfield; //cache the drift direction
457 
458  // Pixel Efficiency moved from the constructor to the method run because
459  // the information of the det are not available in the constructor
460  // Effciency parameters. 0 - no inefficiency, 1-low lumi, 10-high lumi
461 
463 
464  _signal.clear();
465 
466  // initalization of pixeldigisimlinks
467  link_coll.clear();
468 
469  //Digitization of the SimHits of a given pixdet
470  vector<PixelDigi> collector =digitize(pixdet);
471 
472  // edm::DetSet<PixelDigi> collector;
473 
474 #ifdef TP_DEBUG
475  LogDebug ("PixelDigitizer") << "[SiPixelDigitizerAlgorithm] converted " << collector.size() << " PixelDigis in DetUnit" << detID;
476 #endif
477 
478  return collector;
479 }
#define LogDebug(id)
const PixelGeomDetUnit * _detp
std::vector< PixelDigi > digitize(PixelGeomDetUnit *det)
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
std::vector< PixelDigiSimLink > link_coll
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
tuple input
Definition: collect_tpl.py:10

Member Data Documentation

GlobalVector SiPixelDigitizerAlgorithm::_bfield
private

Definition at line 316 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection(), and run().

std::vector<SignalPoint> SiPixelDigitizerAlgorithm::_collection_points
private

Definition at line 351 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), drift(), and induce_signal().

const PixelGeomDetUnit* SiPixelDigitizerAlgorithm::_detp
private

Definition at line 306 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection(), and run().

std::vector<EnergyDepositUnit> SiPixelDigitizerAlgorithm::_ionization_points
private

Definition at line 350 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and primary_ionization().

std::vector<PSimHit> SiPixelDigitizerAlgorithm::_PixelHits
private

Definition at line 310 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and run().

signal_map_type SiPixelDigitizerAlgorithm::_signal
private
bool SiPixelDigitizerAlgorithm::addChargeVCALSmearing
private

Definition at line 289 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), and SiPixelDigitizerAlgorithm().

bool SiPixelDigitizerAlgorithm::addNoise
private
bool SiPixelDigitizerAlgorithm::addNoisyPixels
private

Definition at line 290 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), digitize(), and SiPixelDigitizerAlgorithm().

bool SiPixelDigitizerAlgorithm::addPixelInefficiency
private

Definition at line 292 of file SiPixelDigitizerAlgorithm.h.

bool SiPixelDigitizerAlgorithm::addThresholdSmearing
private
bool SiPixelDigitizerAlgorithm::alpha2Order
private

Definition at line 244 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), DriftDirection(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p0
private

Definition at line 281 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p1
private

Definition at line 282 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p2
private

Definition at line 283 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p3
private

Definition at line 284 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

std::map<int,CalParameters,std::less<int> > SiPixelDigitizerAlgorithm::calmap
private

Definition at line 357 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::ClusterWidth
private

Definition at line 249 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal(), and SiPixelDigitizerAlgorithm().

edm::ParameterSet SiPixelDigitizerAlgorithm::conf_
private

Definition at line 234 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

Parameters SiPixelDigitizerAlgorithm::DeadModules
private

Definition at line 91 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_conf().

uint32_t SiPixelDigitizerAlgorithm::detID
private
float SiPixelDigitizerAlgorithm::Dist300
private

Definition at line 243 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and SiPixelDigitizerAlgorithm().

bool SiPixelDigitizerAlgorithm::doMissCalibrate
private

Definition at line 329 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), make_digis(), and SiPixelDigitizerAlgorithm().

double SiPixelDigitizerAlgorithm::electronsPerVCAL
private

Definition at line 269 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

double SiPixelDigitizerAlgorithm::electronsPerVCAL_Offset
private

Definition at line 270 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

CLHEP::RandFlat* SiPixelDigitizerAlgorithm::flatDistribution_
private
SiG4UniversalFluctuation* SiPixelDigitizerAlgorithm::fluctuate
private
bool SiPixelDigitizerAlgorithm::fluctuateCharge
private
float SiPixelDigitizerAlgorithm::FPix_p0
private

Definition at line 277 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::FPix_p1
private

Definition at line 278 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::FPix_p2
private

Definition at line 279 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::FPix_p3
private

Definition at line 280 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::gaussDistribution_
private
CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::gaussDistributionVCALNoise_
private
edm::ESHandle<TrackerGeometry> SiPixelDigitizerAlgorithm::geom_
private

Definition at line 88 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::GeVperElectron
private

Definition at line 239 of file SiPixelDigitizerAlgorithm.h.

Referenced by primary_ionization(), and SiPixelDigitizerAlgorithm().

std::vector<PixelDigi> SiPixelDigitizerAlgorithm::internal_coll
private

Definition at line 313 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and make_digis().

std::vector<PixelDigiSimLink> SiPixelDigitizerAlgorithm::link_coll
private

Definition at line 315 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis(), make_link(), and run().

edm::ESHandle<SiPixelFedCablingMap> SiPixelDigitizerAlgorithm::map_
private

Definition at line 87 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_DB().

float SiPixelDigitizerAlgorithm::moduleThickness
private

Definition at line 304 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and drift().

int SiPixelDigitizerAlgorithm::NumberOfSegments
private

Definition at line 237 of file SiPixelDigitizerAlgorithm.h.

Referenced by primary_ionization(), and SiPixelDigitizerAlgorithm().

int SiPixelDigitizerAlgorithm::numColumns
private
int SiPixelDigitizerAlgorithm::numRows
private
PixelIndices* SiPixelDigitizerAlgorithm::pIndexConverter
private

Definition at line 348 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and pixel_inefficiency().

float SiPixelDigitizerAlgorithm::PixelChipEff
private

Definition at line 320 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelChipEfficiency
private

Definition at line 323 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelColEff
private

Definition at line 319 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelColEfficiency
private

Definition at line 322 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelEff
private

Definition at line 318 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelEfficiency
private

Definition at line 321 of file SiPixelDigitizerAlgorithm.h.

bool SiPixelDigitizerAlgorithm::pixelInefficiency
private

Definition at line 294 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and SiPixelDigitizerAlgorithm().

CLHEP::HepRandomEngine& SiPixelDigitizerAlgorithm::rndEngine
private

Definition at line 388 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::Sigma0
private

Definition at line 242 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and SiPixelDigitizerAlgorithm().

simlink_map SiPixelDigitizerAlgorithm::simi
private

Definition at line 353 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis().

edm::ESHandle<SiPixelQuality> SiPixelDigitizerAlgorithm::SiPixelBadModule_
private

Definition at line 84 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_DB().

edm::ESHandle<SiPixelLorentzAngle> SiPixelDigitizerAlgorithm::SiPixelLorentzAngle_
private

Definition at line 81 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::smearedChargeDistribution_
private

Definition at line 399 of file SiPixelDigitizerAlgorithm.h.

CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::smearedThreshold_BPix_
private
CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::smearedThreshold_FPix_
private
float SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_BPix
private

Definition at line 275 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

float SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_FPix
private

Definition at line 274 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

int SiPixelDigitizerAlgorithm::theAdcFullScale
private

Definition at line 252 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis(), and SiPixelDigitizerAlgorithm().

int SiPixelDigitizerAlgorithm::theColsInChip
private

Definition at line 299 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::theElectronPerADC
private

Definition at line 251 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::theGainSmearing
private

Definition at line 330 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::theGaussianDistribution
private

Definition at line 402 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::theNoiseInElectrons
private

Definition at line 253 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), digitize(), and SiPixelDigitizerAlgorithm().

GaussianTailNoiseGenerator* SiPixelDigitizerAlgorithm::theNoiser
private
float SiPixelDigitizerAlgorithm::theOffsetSmearing
private

Definition at line 331 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelChipEfficiency[6]
private

Definition at line 326 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelColEfficiency[6]
private

Definition at line 325 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelEfficiency[6]
private

Definition at line 324 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency(), and SiPixelDigitizerAlgorithm().

int SiPixelDigitizerAlgorithm::thePixelLuminosity
private

Definition at line 295 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelThreshold
private

Definition at line 259 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), and digitize().

float SiPixelDigitizerAlgorithm::thePixelThresholdInE
private

Definition at line 261 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and make_digis().

float SiPixelDigitizerAlgorithm::theReadoutNoise
private

Definition at line 254 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

int SiPixelDigitizerAlgorithm::theRowsInChip
private

Definition at line 300 of file SiPixelDigitizerAlgorithm.h.

SiPixelGainCalibrationOfflineSimService* SiPixelDigitizerAlgorithm::theSiPixelGainCalibrationService_
private
float SiPixelDigitizerAlgorithm::theSmearedChargeRMS
private

Definition at line 257 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

float SiPixelDigitizerAlgorithm::theThresholdInE_BPix
private
float SiPixelDigitizerAlgorithm::theThresholdInE_FPix
private
double SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix
private

Definition at line 267 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

double SiPixelDigitizerAlgorithm::theThresholdSmearing_FPix
private

Definition at line 266 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::theTofLowerCut
private

Definition at line 272 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::theTofUpperCut
private

Definition at line 273 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and SiPixelDigitizerAlgorithm().

double SiPixelDigitizerAlgorithm::tMax
private

Definition at line 339 of file SiPixelDigitizerAlgorithm.h.

Referenced by fluctuateEloss(), and SiPixelDigitizerAlgorithm().

const PixelTopology* SiPixelDigitizerAlgorithm::topol
private

Definition at line 311 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and induce_signal().

bool SiPixelDigitizerAlgorithm::use_deadmodule_DB_
private

Definition at line 375 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

bool SiPixelDigitizerAlgorithm::use_ineff_from_db_
private

Definition at line 372 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and pixel_inefficiency_db().

bool SiPixelDigitizerAlgorithm::use_LorentzAngle_DB_
private

Definition at line 376 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

bool SiPixelDigitizerAlgorithm::use_module_killing_
private

Definition at line 374 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), module_killing_conf(), and module_killing_DB().