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
 
float lorentzAngle
 
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 141 of file SiPixelDigitizerAlgorithm.cc.

References addChargeVCALSmearing, addNoise, addNoisyPixels, addThresholdSmearing, alpha2Order, BPix_p0, BPix_p1, BPix_p2, BPix_p3, calmap, dtNoiseDBValidation_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, create_public_lumi_plots::in_file, geometryCSVtoXML::line, LogDebug, mergeVDriftHistosByStation::name, NumberOfSegments, AlCaHLTBitMon_ParallelJobs::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.

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

Definition at line 437 of file SiPixelDigitizerAlgorithm.cc.

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

437  {
438 
439  LogDebug ("PixelDigitizer")<<"SiPixelDigitizerAlgorithm deleted";
440 
441  // Destructor
442  delete gaussDistribution_;
444  delete flatDistribution_;
445 
447 
448  // Threshold gaussian smearing:
450  delete smearedThreshold_FPix_;
451  delete smearedThreshold_BPix_;
452  }
453 
454  if(addNoise) delete theNoiser;
455  if(fluctuateCharge) delete fluctuate;
456 
457 }
#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 1162 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().

1162  {
1163 
1164 #ifdef TP_DEBUG
1165  LogDebug ("Pixel Digitizer") << " enter add_noise " << theNoiseInElectrons;
1166 #endif
1167 
1168  // First add noise to hit pixels
1169 
1170  for ( signal_map_iterator i = _signal.begin(); i != _signal.end(); i++) {
1171 
1173  {
1174  if((*i).second < 3000)
1175  {
1176  theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1177  } else if((*i).second < 6000){
1178  theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1179  } else{
1180  theSmearedChargeRMS = -432.4 +(*i).second * 0.123;
1181  }
1182 
1183  // Noise from Vcal smearing:
1184  float noise_ChargeVCALSmearing = theSmearedChargeRMS * gaussDistributionVCALNoise_->fire() ;
1185  // Noise from full readout:
1186  float noise = gaussDistribution_->fire() ;
1187 
1188  if(((*i).second + Amplitude(noise+noise_ChargeVCALSmearing,0,-1.)) < 0. ) {
1189  (*i).second.set(0);}
1190  else{
1191  (*i).second +=Amplitude(noise+noise_ChargeVCALSmearing,0,-1.);
1192  }
1193 
1194  } // End if addChargeVCalSmearing
1195  else
1196  {
1197  // Noise: ONLY full READOUT Noise.
1198  // Use here the FULL readout noise, including TBM,ALT,AOH,OPT-REC.
1199 
1200  float noise = gaussDistribution_->fire() ;
1201  if(((*i).second + Amplitude(noise,0,-1.)) < 0. ) {
1202  (*i).second.set(0);}
1203  else{
1204  (*i).second +=Amplitude(noise,0,-1.);
1205  }
1206  } // end if only Noise from full readout
1207 
1208  }
1209 
1210  if(!addNoisyPixels) // Option to skip noise in non-hit pixels
1211  return;
1212 
1213  // Add noise on non-hit pixels
1214  // Use here the pixel noise
1215  int numberOfPixels = (numRows * numColumns);
1216  map<int,float, less<int> > otherPixels;
1217  map<int,float, less<int> >::iterator mapI;
1218 
1219  theNoiser->generate(numberOfPixels,
1220  thePixelThreshold, //thr. in un. of nois
1221  theNoiseInElectrons, // noise in elec.
1222  otherPixels );
1223 
1224 #ifdef TP_DEBUG
1225  LogDebug ("Pixel Digitizer")
1226  << " Add noisy pixels " << numRows << " "
1227  << numColumns << " " << theNoiseInElectrons << " "
1228  << theThresholdInE_FPix << theThresholdInE_BPix <<" "<< numberOfPixels<<" "
1229  << otherPixels.size() ;
1230 #endif
1231 
1232  // Add noisy pixels
1233  for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
1234  int iy = ((*mapI).first) / numRows;
1235  int ix = ((*mapI).first) - (iy*numRows);
1236 
1237  // Keep for a while for testing.
1238  if( iy < 0 || iy > (numColumns-1) )
1239  LogWarning ("Pixel Geometry") << " error in iy " << iy ;
1240  if( ix < 0 || ix > (numRows-1) )
1241  LogWarning ("Pixel Geometry") << " error in ix " << ix ;
1242 
1243  int chan = PixelDigi::pixelToChannel(ix, iy);
1244 
1245 #ifdef TP_DEBUG
1246  LogDebug ("Pixel Digitizer")
1247  <<" Storing noise = " << (*mapI).first << " " << (*mapI).second
1248  << " " << ix << " " << iy << " " << chan ;
1249 #endif
1250 
1251  if(_signal[chan] == 0){
1252  // float noise = float( (*mapI).second );
1253  int noise=int( (*mapI).second );
1254  _signal[chan] = Amplitude (noise, 0,-1.);
1255  }
1256  }
1257 
1258 }
#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 494 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().

494  {
495 
496  if( _PixelHits.size() > 0 || addNoisyPixels) {
497 
498  topol=&det->specificTopology(); // cache topology
499  numColumns = topol->ncolumns(); // det module number of cols&rows
500  numRows = topol->nrows();
501 
502  // full detector thickness
504 
505  // The index converter is only needed when inefficiencies or misscalibration
506  // are simulated.
507  if((pixelInefficiency>0) || doMissCalibrate ) { // Init pixel indices
509  }
510 
511  // Noise already defined in electrons
512  //thePixelThresholdInE = thePixelThreshold * theNoiseInElectrons ;
513  // Find the threshold in noise units, needed for the noiser.
514 
515  unsigned int Sub_detid=DetId(detID).subdetId();
516 
517  if(theNoiseInElectrons>0.){
518  if(Sub_detid == PixelSubdetector::PixelBarrel){ // Barrel modules
520  thePixelThresholdInE = smearedThreshold_BPix_->fire(); // gaussian smearing
521  } else {
523  }
524 
526 
527  } else { // Forward disks modules
529  thePixelThresholdInE = smearedThreshold_FPix_->fire(); // gaussian smearing
530  } else {
532  }
533 
535 
536  }
537  } else {
538  thePixelThreshold = 0.;
539  }
540 
541 
542 #ifdef TP_DEBUG
543  LogDebug ("PixelDigitizer")
544  << " PixelDigitizer "
545  << numColumns << " " << numRows << " " << moduleThickness;
546 #endif
547 
548  // produce SignalPoint's for all SimHit's in detector
549  // Loop over hits
550 
551  vector<PSimHit>::const_iterator ssbegin;
552  for (ssbegin= _PixelHits.begin();ssbegin !=_PixelHits.end(); ++ssbegin) {
553 
554 #ifdef TP_DEBUG
555  LogDebug ("Pixel Digitizer")
556  << (*ssbegin).particleType() << " " << (*ssbegin).pabs() << " "
557  << (*ssbegin).energyLoss() << " " << (*ssbegin).tof() << " "
558  << (*ssbegin).trackId() << " " << (*ssbegin).processType() << " "
559  << (*ssbegin).detUnitId()
560  << (*ssbegin).entryPoint() << " " << (*ssbegin).exitPoint() ;
561 #endif
562 
563  _collection_points.clear(); // Clear the container
564  // fill _collection_points for this SimHit, indpendent of topology
565  // Check the TOF cut
566  //if(std::abs( (*ssbegin).tof() )<theTofCut){ // old cut
567  if( ((*ssbegin).tof() >= theTofLowerCut) && ((*ssbegin).tof() <= theTofUpperCut) ) {
568  primary_ionization(*ssbegin); // fills _ionization_points
569  drift(*ssbegin); // transforms _ionization_points to _collection_points
570  // compute induced signal on readout elements and add to _signal
571  induce_signal(*ssbegin); // *ihit needed only for SimHit<-->Digi link
572  } // end if
573  } // end for
574 
575  if(addNoise) add_noise(); // generate noise
576  // Do only if needed
577 
578  if((pixelInefficiency>0) && (_signal.size()>0))
579  pixel_inefficiency(); // Kill some pixels
580 
581  if(use_ineff_from_db_ && (_signal.size()>0))
583 
584  delete pIndexConverter;
585 
586  if(use_module_killing_ && use_deadmodule_DB_) // remove dead modules using DB
588 
589  if(use_module_killing_ && !use_deadmodule_DB_) // remove dead modules using the list in cfg file
591 
592  }
593 
594  make_digis();
595 
596  return internal_coll;
597 }
#define LogDebug(id)
virtual int ncolumns() const =0
virtual int nrows() const =0
const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:38
virtual float thickness() const =0
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 729 of file SiPixelDigitizerAlgorithm.cc.

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

Referenced by digitize().

729  {
730 
731 
732 #ifdef TP_DEBUG
733  LogDebug ("Pixel Digitizer") << " enter drift " ;
734 #endif
735 
736  _collection_points.resize( _ionization_points.size()); // set size
737 
739  //float LorentzAng = SiPixelLorentzAngle_->getLorentzAngle(hit.detUnitId());
740  lorentzAngle = SiPixelLorentzAngle_->getLorentzAngle(hit.detUnitId());
741  }
742 
743  //LocalVector driftDir=DriftDirection(LorentzAng); // get the charge drift direction
744  LocalVector driftDir=DriftDirection(); // get the charge drift direction
745  if(driftDir.z() ==0.) {
746  LogWarning("Magnetic field") << " pxlx: drift in z is zero ";
747  return;
748  }
749 
750  // tangent of Lorentz angle
751  //float TanLorenzAngleX = driftDir.x()/driftDir.z();
752  //float TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
753 
754  float TanLorenzAngleX, TanLorenzAngleY,dir_z, CosLorenzAngleX,
755  CosLorenzAngleY;
756  if( alpha2Order) {
757 
758  TanLorenzAngleX = driftDir.x(); // tangen of Lorentz angle
759  TanLorenzAngleY = driftDir.y();
760  dir_z = driftDir.z(); // The z drift direction
761  CosLorenzAngleX = 1./sqrt(1.+TanLorenzAngleX*TanLorenzAngleX); //cosine
762  CosLorenzAngleY = 1./sqrt(1.+TanLorenzAngleY*TanLorenzAngleY); //cosine;
763 
764  } else{
765 
766  TanLorenzAngleX = driftDir.x();
767  TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
768  dir_z = driftDir.z(); // The z drift direction
769  CosLorenzAngleX = 1./sqrt(1.+TanLorenzAngleX*TanLorenzAngleX); //cosine to estimate the path length
770  CosLorenzAngleY = 1.;
771  }
772 
773 
774 #ifdef TP_DEBUG
775  LogDebug ("Pixel Digitizer")
776  << " Lorentz Tan " << TanLorenzAngleX << " " << TanLorenzAngleY <<" "
777  << CosLorenzAngleX << " " << CosLorenzAngleY << " "
778  << moduleThickness*TanLorenzAngleX << " " << driftDir;
779 #endif
780 
781  float Sigma_x = 1.; // Charge spread
782  float Sigma_y = 1.;
783  float DriftDistance; // Distance between charge generation and collection
784  float DriftLength; // Actual Drift Lentgh
785  float Sigma;
786 
787 
788  for (unsigned int i = 0; i != _ionization_points.size(); i++) {
789 
790  float SegX, SegY, SegZ; // position
791  SegX = _ionization_points[i].x();
792  SegY = _ionization_points[i].y();
793  SegZ = _ionization_points[i].z();
794 
795  // Distance from the collection plane
796  //DriftDistance = (moduleThickness/2. + SegZ); // Drift to -z
797  // Include explixitely the E drift direction (for CMS dir_z=-1)
798  DriftDistance = moduleThickness/2. - (dir_z * SegZ); // Drift to -z
799 
800  //if( DriftDistance <= 0.)
801  //cout<<" <=0 "<<DriftDistance<<" "<<i<<" "<<SegZ<<" "<<dir_z<<" "
802  // <<SegX<<" "<<SegY<<" "<<(moduleThickness/2)<<" "
803  // <<_ionization_points[i].energy()<<" "
804  // <<hit.particleType()<<" "<<hit.pabs()<<" "<<hit.energyLoss()<<" "
805  // <<hit.entryPoint()<<" "<<hit.exitPoint()
806  // <<endl;
807 
808  if( DriftDistance < 0.) {
809  DriftDistance = 0.;
810  } else if( DriftDistance > moduleThickness )
811  DriftDistance = moduleThickness;
812 
813  // Assume full depletion now, partial depletion will come later.
814  float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
815  float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
816 
817  // Shift cloud center
818  float CloudCenterX = SegX + XDriftDueToMagField;
819  float CloudCenterY = SegY + YDriftDueToMagField;
820 
821  // Calculate how long is the charge drift path
822  DriftLength = sqrt( DriftDistance*DriftDistance +
823  XDriftDueToMagField*XDriftDueToMagField +
824  YDriftDueToMagField*YDriftDueToMagField );
825 
826  // What is the charge diffusion after this path
827  Sigma = sqrt(DriftLength/Dist300) * Sigma0;
828 
829  // Project the diffusion sigma on the collection plane
830  Sigma_x = Sigma / CosLorenzAngleX ;
831  Sigma_y = Sigma / CosLorenzAngleY ;
832 
833  SignalPoint sp( CloudCenterX, CloudCenterY,
834  Sigma_x, Sigma_y, hit.tof(), _ionization_points[i].energy() );
835 
836  // Load the Charge distribution parameters
837  _collection_points[i] = (sp);
838 
839  } // loop over ionization points, i.
840 
841 } // 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:62
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
Double_t Sigma(double mHreq, TString proc)
std::vector< EnergyDepositUnit > _ionization_points
std::vector< SignalPoint > _collection_points
T x() const
Definition: PV3DBase.h:61
unsigned int detUnitId() const
Definition: PSimHit.h:93
LocalVector SiPixelDigitizerAlgorithm::DriftDirection ( )
private

Definition at line 1464 of file SiPixelDigitizerAlgorithm.cc.

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

Referenced by drift().

1464  {
1465  Frame detFrame(_detp->surface().position(),_detp->surface().rotation());
1466  LocalVector Bfield=detFrame.toLocal(_bfield);
1467 
1468  float alpha2_FPix;
1469  float alpha2_BPix;
1470  float alpha2;
1471 
1472  //float dir_x = -tanLorentzAnglePerTesla * Bfield.y();
1473  //float dir_y = +tanLorentzAnglePerTesla * Bfield.x();
1474  //float dir_z = -1.; // E field always in z direction, so electrons go to -z
1475  // The dir_z has to be +/- 1. !
1476  // LocalVector theDriftDirection = LocalVector(dir_x,dir_y,dir_z);
1477 
1478  float dir_x = 0.0;
1479  float dir_y = 0.0;
1480  float dir_z = 0.0;
1481  float scale = 0.0;
1482 
1483  unsigned int Sub_detid=DetId(detID).subdetId();
1484 
1485  // Read Lorentz angle from cfg file:**************************************************************
1486 
1487  if(!use_LorentzAngle_DB_){
1488 
1489  if( alpha2Order) {
1492  }else {
1493  alpha2_FPix = 0.0;
1494  alpha2_BPix = 0.0;
1495  }
1496 
1497  if(Sub_detid == PixelSubdetector::PixelBarrel){// barrel layers
1498  dir_x = -( tanLorentzAnglePerTesla_BPix * Bfield.y() + alpha2_BPix* Bfield.z()* Bfield.x() );
1499  dir_y = +( tanLorentzAnglePerTesla_BPix * Bfield.x() - alpha2_BPix* Bfield.z()* Bfield.y() );
1500  dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1501  scale = (1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1502 
1503  } else {// forward disks
1504  dir_x = -( tanLorentzAnglePerTesla_FPix * Bfield.y() + alpha2_FPix* Bfield.z()* Bfield.x() );
1505  dir_y = +( tanLorentzAnglePerTesla_FPix * Bfield.x() - alpha2_FPix* Bfield.z()* Bfield.y() );
1506  dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1507  scale = (1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1508  }
1509  } // end: Read LA from cfg file.
1510 
1511  //Read Lorentz angle from DB:********************************************************************
1513  alpha2 = lorentzAngle * lorentzAngle;
1514  //std::cout << "detID is: "<< it->first <<"The LA per tesla is: "<< it->second << std::endl;
1515  dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
1516  dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
1517  dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
1518  scale = (1 + alpha2 * Bfield.z()*Bfield.z() );
1519  }// end: Read LA from DataBase.
1520 
1521  LocalVector theDriftDirection = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale );
1522 
1523 #ifdef TP_DEBUG
1524  LogDebug ("Pixel Digitizer") << " The drift direction in local coordinate is "
1525  << theDriftDirection ;
1526 #endif
1527 
1528  return theDriftDirection;
1529 }
#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
Definition: DetId.h:20
GloballyPositioned< double > Frame
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const RotationType & rotation() const
const PositionType & position() const
void SiPixelDigitizerAlgorithm::fillDeadModules ( const edm::EventSetup es)

Definition at line 110 of file SiPixelDigitizerAlgorithm.cc.

References edm::EventSetup::get().

110  {
111  if(!use_deadmodule_DB_){
112  DeadModules = conf_.getParameter<Parameters>("DeadModules"); // get dead module from cfg file
113  }
114  else{ // Get dead module from DB record
115  // ESHandle was defined in the header file edm::ESHandle<SiPixelQuality> SiPixelBadModule_;
117  }
118 }
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 120 of file SiPixelDigitizerAlgorithm.cc.

References edm::EventSetup::get().

120  {
122  // Get the Lorentz angle from the cfg file:
123  tanLorentzAnglePerTesla_FPix=conf_.getParameter<double>("TanLorentzAnglePerTesla_FPix");
124  tanLorentzAnglePerTesla_BPix=conf_.getParameter<double>("TanLorentzAnglePerTesla_BPix");
125  }
126  else {
127  // Get Lorentz angle from DB record
128  // ESHandle was defined in the header file edm::ESHandle<SiPixelLorentzAngle> SiPixelLorentzAngle_;
130  }
131 }
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 134 of file SiPixelDigitizerAlgorithm.cc.

References edm::EventSetup::get().

134  {
135  es.get<SiPixelFedCablingMapRcd>().get(map_);
137 }
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 674 of file SiPixelDigitizerAlgorithm.cc.

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

Referenced by primary_ionization().

676  {
677 
678  // Get dedx for this track
679  //float dedx;
680  //if( length > 0.) dedx = eloss/length;
681  //else dedx = eloss;
682 
683  double particleMass = 139.6; // Mass in MeV, Assume pion
684  pid = abs(pid);
685  if(pid!=211) { // Mass in MeV
686  if(pid==11) particleMass = 0.511;
687  else if(pid==13) particleMass = 105.7;
688  else if(pid==321) particleMass = 493.7;
689  else if(pid==2212) particleMass = 938.3;
690  }
691  // What is the track segment length.
692  float segmentLength = length/NumberOfSegs;
693 
694  // Generate charge fluctuations.
695  float de=0.;
696  float sum=0.;
697  double segmentEloss = (1000.*eloss)/NumberOfSegs; //eloss in MeV
698  for (int i=0;i<NumberOfSegs;i++) {
699  // material,*, momentum,energy,*, *, mass
700  //myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
701  // The G4 routine needs momentum in MeV, mass in Mev, delta-cut in MeV,
702  // track segment length in mm, segment eloss in MeV
703  // Returns fluctuated eloss in MeV
704  double deltaCutoff = tMax; // the cutoff is sometimes redefined inside, so fix it.
705  de = fluctuate->SampleFluctuations(double(particleMomentum*1000.),
706  particleMass, deltaCutoff,
707  double(segmentLength*10.),
708  segmentEloss )/1000.; //convert to GeV
709 
710  elossVector[i]=de;
711  sum +=de;
712  }
713 
714  if(sum>0.) { // If fluctuations give eloss>0.
715  // Rescale to the same total eloss
716  float ratio = eloss/sum;
717 
718  for (int ii=0;ii<NumberOfSegs;ii++) elossVector[ii]= ratio*elossVector[ii];
719  } else { // If fluctuations gives 0 eloss
720  float averageEloss = eloss/NumberOfSegs;
721  for (int ii=0;ii<NumberOfSegs;ii++) elossVector[ii]= averageEloss;
722  }
723  return;
724 }
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 845 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, PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), vdt::x, detailsBasic3DVector::y, PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by digitize().

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

Definition at line 97 of file SiPixelDigitizerAlgorithm.cc.

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

97  {
98  if(use_ineff_from_db_){// load gain calibration service fromdb...
101  }
102 
103  fillDeadModules(es); // gets the dead module from config file or DB.
104  fillLorentzAngle(es); // gets the Lorentz angle from the config file or DB.
105  fillMapandGeom(es); //gets the map and geometry from the DB (to kill ROCs)
106 }
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 1083 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().

1083  {
1084  internal_coll.reserve(50); internal_coll.clear();
1085 
1086 #ifdef TP_DEBUG
1087  LogDebug ("Pixel Digitizer") << " make digis "<<" "
1088  << " pixel threshold FPix" << theThresholdInE_FPix << " "
1089  << " pixel threshold BPix" << theThresholdInE_BPix << " "
1090  << " List pixels passing threshold ";
1091 #endif
1092 
1093  // Loop over hit pixels
1094 
1095  for ( signal_map_iterator i = _signal.begin(); i != _signal.end(); i++) {
1096 
1097  float signalInElectrons = (*i).second ; // signal in electrons
1098 
1099  // Do the miss calibration for calibration studies only.
1100  //if(doMissCalibrate) signalInElectrons = missCalibrate(signalInElectrons)
1101 
1102  // Do only for pixels above threshold
1103 
1104  if( signalInElectrons >= thePixelThresholdInE) { // check threshold
1105 
1106  int chan = (*i).first; // channel number
1107  pair<int,int> ip = PixelDigi::channelToPixel(chan);
1108  int adc=0; // ADC count as integer
1109 
1110  // Do the miss calibration for calibration studies only.
1111  if(doMissCalibrate) {
1112  int row = ip.first; // X in row
1113  int col = ip.second; // Y is in col
1114  adc = int(missCalibrate(col,row,signalInElectrons)); //full misscalib.
1115  } else { // Just do a simple electron->adc conversion
1116  adc = int( signalInElectrons / theElectronPerADC ); // calibrate gain
1117  }
1118  adc = min(adc, theAdcFullScale); // Check maximum value
1119 
1120 #ifdef TP_DEBUG
1121  LogDebug ("Pixel Digitizer")
1122  << (*i).first << " " << (*i).second << " " << signalInElectrons
1123  << " " << adc << ip.first << " " << ip.second ;
1124 #endif
1125 
1126  // Load digis
1127  internal_coll.push_back( PixelDigi( ip.first, ip.second, adc));
1128 
1129  //digilink
1130  if((*i).second.hits().size()>0){
1131  simi.clear();
1132  unsigned int il=0;
1133  for( vector<const PSimHit*>::const_iterator ihit = (*i).second.hits().begin();
1134  ihit != (*i).second.hits().end(); ihit++) {
1135  simi[(**ihit).trackId()].push_back((*i).second.individualampl()[il]);
1136  il++;
1137  }
1138 
1139  //sum the contribution of the same trackid
1140  for( simlink_map::iterator simiiter=simi.begin();
1141  simiiter!=simi.end();
1142  simiiter++){
1143 
1144  float sum_samechannel=0;
1145  for (unsigned int iii=0;iii<(*simiiter).second.size();iii++){
1146  sum_samechannel+=(*simiiter).second[iii];
1147  }
1148  float fraction=sum_samechannel/(*i).second;
1149  if(fraction>1.) fraction=1.;
1150  link_coll.push_back(PixelDigiSimLink((*i).first,(*simiiter).first,((*i).second.hits().front())->eventId(),fraction));
1151  }
1152 
1153  }
1154  }
1155 
1156  }
1157 }
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 1381 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().

1382  {
1383 
1384  // Central values
1385  //const float p0=0.00352, p1=0.868, p2=112., p3=113.; // pix(0,0,0)
1386  // const float p0=0.00382, p1=0.886, p2=112.7, p3=113.0; // average roc=0
1387  //const float p0=0.00492, p1=1.998, p2=90.6, p3=134.1; // average roc=6
1388  // Smeared (rms)
1389  //const float s0=0.00020, s1=0.051, s2=5.4, s3=4.4; // average roc=0
1390  //const float s0=0.00015, s1=0.043, s2=3.2, s3=3.1; // col average roc=0
1391 
1392  // Make 2 sets of parameters for Fpix and BPIx:
1393 
1394  float p0=0.0;
1395  float p1=0.0;
1396  float p2=0.0;
1397  float p3=0.0;
1398 
1399  unsigned int Sub_detid=DetId(detID).subdetId();
1400 
1401  if(Sub_detid == PixelSubdetector::PixelBarrel){// barrel layers
1402  p0 = BPix_p0;
1403  p1 = BPix_p1;
1404  p2 = BPix_p2;
1405  p3 = BPix_p3;
1406  } else {// forward disks
1407  p0 = FPix_p0;
1408  p1 = FPix_p1;
1409  p2 = FPix_p2;
1410  p3 = FPix_p3;
1411  }
1412 
1413  // const float electronsPerVCAL = 65.5; // our present VCAL calibration (feb 2009)
1414  // const float electronsPerVCAL_Offset = -414.0; // our present VCAL calibration (feb 2009)
1415  float newAmp = 0.; //Modified signal
1416 
1417  // Convert electrons to VCAL units
1418  float signal = (signalInElectrons-electronsPerVCAL_Offset)/electronsPerVCAL;
1419 
1420  // Simulate the analog response with fixed parametrization
1421  newAmp = p3 + p2 * tanh(p0*signal - p1);
1422 
1423 
1424  // Use the pixel-by-pixel calibrations
1425  //transform to ROC index coordinates
1426  //int chipIndex=0, colROC=0, rowROC=0;
1427  //pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1428 
1429  // Use calibration from a file
1430  //int chanROC = PixelIndices::pixelToChannelROC(rowROC,colROC); // use ROC coordinates
1431  //float pp0=0, pp1=0,pp2=0,pp3=0;
1432  //map<int,CalParameters,less<int> >::const_iterator it=calmap.find(chanROC);
1433  //CalParameters y = (*it).second;
1434  //pp0 = y.p0;
1435  //pp1 = y.p1;
1436  //pp2 = y.p2;
1437  //pp3 = y.p3;
1438 
1439  //
1440  // Use random smearing
1441  // Randomize the pixel response
1442  //float pp0 = RandGaussQ::shoot(p0,s0);
1443  //float pp1 = RandGaussQ::shoot(p1,s1);
1444  //float pp2 = RandGaussQ::shoot(p2,s2);
1445  //float pp3 = RandGaussQ::shoot(p3,s3);
1446 
1447  //newAmp = pp3 + pp2 * tanh(pp0*signal - pp1); // Final signal
1448 
1449  //cout<<" misscalibrate "<<col<<" "<<row<<" "<<chipIndex<<" "<<colROC<<" "
1450  // <<rowROC<<" "<<signalInElectrons<<" "<<signal<<" "<<newAmp<<" "
1451  // <<(signalInElectrons/theElectronPerADC)<<endl;
1452 
1453  return newAmp;
1454 }
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 1557 of file SiPixelDigitizerAlgorithm.cc.

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

Referenced by digitize().

1557  {
1558  if(!use_module_killing_)
1559  return;
1560 
1561  bool isbad=false;
1562  int detid = detID;
1563 
1564  Parameters::iterator itDeadModules=DeadModules.begin();
1565 
1566  for(; itDeadModules != DeadModules.end(); ++itDeadModules){
1567  int Dead_detID = itDeadModules->getParameter<int>("Dead_detID");
1568  if(detid==Dead_detID){
1569  isbad=true;
1570  break;
1571  }
1572  }
1573 
1574  if(!isbad)
1575  return;
1576 
1577  std::string Module = itDeadModules->getParameter<std::string>("Module");
1578 
1579  if(Module=="whole"){
1580  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1581  i->second.set(0.); // reset amplitude
1582  }
1583  }
1584 
1585  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1586  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1587 
1588  if(Module=="tbmA" && ip.first>=80 && ip.first<=159){
1589  i->second.set(0.);
1590  }
1591 
1592  if( Module=="tbmB" && ip.first<=79){
1593  i->second.set(0.);
1594 
1595  }
1596  }
1597 }
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 1599 of file SiPixelDigitizerAlgorithm.cc.

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

Referenced by digitize().

1599  {
1600  if(!use_module_killing_)
1601  return;
1602 
1603  bool isbad=false;
1604  uint32_t detid = detID;
1605 
1606  std::vector<SiPixelQuality::disabledModuleType>disabledModules = SiPixelBadModule_->getBadComponentList();
1607 
1609 
1610  for (size_t id=0;id<disabledModules.size();id++)
1611  {
1612  if(detid==disabledModules[id].DetID){
1613  isbad=true;
1614  badmodule = disabledModules[id];
1615  break;
1616  }
1617  }
1618 
1619  if(!isbad)
1620  return;
1621 
1622  //cout<<"Hit in: "<< detid <<" errorType "<< badmodule.errorType<<" BadRocs="<<hex<<SiPixelBadModule_->getBadRocs(detid)<<dec<<" "<<endl;
1623  if(badmodule.errorType == 0){ // this is a whole dead module.
1624 
1625  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1626  i->second.set(0.); // reset amplitude
1627  }
1628  }
1629  else { // all other module types: half-modules and single ROCs.
1630  // Get Bad ROC position:
1631  //follow the example of getBadRocPositions in CondFormats/SiPixelObjects/src/SiPixelQuality.cc
1632  std::vector<GlobalPixel> badrocpositions (0);
1633  for(unsigned int j = 0; j < 16; j++){
1634  if(SiPixelBadModule_->IsRocBad(detid, j) == true){
1635 
1636  std::vector<CablingPathToDetUnit> path = map_.product()->pathToDetUnit(detid);
1637  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
1638  for (IT it = path.begin(); it != path.end(); ++it) {
1639  const PixelROC* myroc = map_.product()->findItem(*it);
1640  if( myroc->idInDetUnit() == j) {
1641  LocalPixel::RocRowCol local = { 39, 25}; //corresponding to center of ROC row, col
1642  GlobalPixel global = myroc->toGlobal( LocalPixel(local) );
1643  badrocpositions.push_back(global);
1644  break;
1645  }
1646  }
1647  }
1648  }// end of getBadRocPositions
1649 
1650 
1651  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1652  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1653 
1654  for(std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it){
1655  if(it->row >= 80 && ip.first >= 80 ){
1656  if((fabs(ip.second - it->col) < 26) ) {i->second.set(0.);}
1657  else if(it->row==120 && ip.second-it->col==26){i->second.set(0.);}
1658  else if(it->row==119 && it->col-ip.second==26){i->second.set(0.);}
1659  }
1660  else if(it->row < 80 && ip.first < 80 ){
1661  if((fabs(ip.second - it->col) < 26) ){i->second.set(0.);}
1662  else if(it->row==40 && ip.second-it->col==26){i->second.set(0.);}
1663  else if(it->row==39 && it->col-ip.second==26){i->second.set(0.);}
1664  }
1665  }
1666  }
1667  }
1668 }
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
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
list path
Definition: scaleCards.py:51
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 1264 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().

1264  {
1265 
1266 
1267  // Predefined efficiencies
1268  float pixelEfficiency = 1.0;
1269  float columnEfficiency = 1.0;
1270  float chipEfficiency = 1.0;
1271 
1272  // setup the chip indices conversion
1273  unsigned int Subid=DetId(detID).subdetId();
1274  if (Subid== PixelSubdetector::PixelBarrel){// barrel layers
1275  int layerIndex=PXBDetId(detID).layer();
1276  pixelEfficiency = thePixelEfficiency[layerIndex-1];
1277  columnEfficiency = thePixelColEfficiency[layerIndex-1];
1278  chipEfficiency = thePixelChipEfficiency[layerIndex-1];
1279 
1280  // This should never happen
1281  if(numColumns>416) LogWarning ("Pixel Geometry") <<" wrong columns in barrel "<<numColumns;
1282  if(numRows>160) LogWarning ("Pixel Geometry") <<" wrong rows in barrel "<<numRows;
1283 
1284  } else { // forward disks
1285 
1286  // For endcaps take same for each endcap
1287  pixelEfficiency = thePixelEfficiency[3];
1288  columnEfficiency = thePixelColEfficiency[3];
1289  chipEfficiency = thePixelChipEfficiency[3];
1290 
1291  // Sometimes the forward pixels have wrong size,
1292  // this crashes the index conversion, so exit.
1293  if(numColumns>260 || numRows>160) {
1294  if(numColumns>260) LogWarning ("Pixel Geometry") <<" wrong columns in endcaps "<<numColumns;
1295  if(numRows>160) LogWarning ("Pixel Geometry") <<" wrong rows in endcaps "<<numRows;
1296  return;
1297  }
1298  } // if barrel/forward
1299 
1300 #ifdef TP_DEBUG
1301  LogDebug ("Pixel Digitizer") << " enter pixel_inefficiency " << pixelEfficiency << " "
1302  << columnEfficiency << " " << chipEfficiency;
1303 #endif
1304 
1305  // Initilize the index converter
1306  //PixelIndices indexConverter(numColumns,numRows);
1307  int chipIndex = 0;
1308  int rowROC = 0;
1309  int colROC = 0;
1310  map<int, int, less<int> >chips, columns;
1311  map<int, int, less<int> >::iterator iter;
1312 
1313  // Find out the number of columns and rocs hits
1314  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1315  for (signal_map_iterator i = _signal.begin();i != _signal.end();i++) {
1316 
1317  int chan = i->first;
1318  pair<int,int> ip = PixelDigi::channelToPixel(chan);
1319  int row = ip.first; // X in row
1320  int col = ip.second; // Y is in col
1321  //transform to ROC index coordinates
1322  pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1323  int dColInChip = pIndexConverter->DColumn(colROC); // get ROC dcol from ROC col
1324  //dcol in mod
1325  int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1326 
1327  chips[chipIndex]++;
1328  columns[dColInDet]++;
1329  }
1330 
1331  // Delete some ROC hits.
1332  for ( iter = chips.begin(); iter != chips.end() ; iter++ ) {
1333  //float rand = RandFlat::shoot();
1334  float rand = flatDistribution_->fire();
1335  if( rand > chipEfficiency ) chips[iter->first]=0;
1336  }
1337 
1338  // Delete some Dcol hits.
1339  for ( iter = columns.begin(); iter != columns.end() ; iter++ ) {
1340  //float rand = RandFlat::shoot();
1341  float rand = flatDistribution_->fire();
1342  if( rand > columnEfficiency ) columns[iter->first]=0;
1343  }
1344 
1345  // Now loop again over pixels to kill some of them.
1346  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1347  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1348 
1349  // int chan = i->first;
1350  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1351  int row = ip.first; // X in row
1352  int col = ip.second; // Y is in col
1353  //transform to ROC index coordinates
1354  pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1355  int dColInChip = pIndexConverter->DColumn(colROC); //get ROC dcol from ROC col
1356  //dcol in mod
1357  int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1358 
1359 
1360  //float rand = RandFlat::shoot();
1361  float rand = flatDistribution_->fire();
1362  if( chips[chipIndex]==0 || columns[dColInDet]==0
1363  || rand>pixelEfficiency ) {
1364  // make pixel amplitude =0, pixel will be lost at clusterization
1365  i->second.set(0.); // reset amplitude,
1366  } // end if
1367 
1368  } // end pixel loop
1369 
1370 } // 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 1533 of file SiPixelDigitizerAlgorithm.cc.

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

Referenced by digitize().

1533  {
1534  if(!use_ineff_from_db_)
1535  return;
1536 
1537  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1538  for(signal_map_iterator i = _signal.begin();i != _signal.end(); i++) {
1539 
1540  // int chan = i->first;
1541  pair<int,int> ip = PixelDigi::channelToPixel(i->first);//get pixel pos
1542  int row = ip.first; // X in row
1543  int col = ip.second; // Y is in col
1544  uint32_t detid = detID;
1545  //transform to ROC index coordinates
1546  if(theSiPixelGainCalibrationService_->isDead(detid, col, row)){
1547  // std::cout << "now in isdead check, row " << detid << " " << col << "," << row << std::endl;
1548  // make pixel amplitude =0, pixel will be lost at clusterization
1549  i->second.set(0.); // reset amplitude,
1550  } // end if
1551  } // end pixel loop
1552 } // 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 602 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().

602  {
603 
604 // Straight line approximation for trajectory inside active media
605 
606  const float SegmentLength = 0.0010; //10microns in cm
607  float energy;
608 
609  // Get the 3D segment direction vector
610  LocalVector direction = hit.exitPoint() - hit.entryPoint();
611 
612  float eLoss = hit.energyLoss(); // Eloss in GeV
613  float length = direction.mag(); // Track length in Silicon
614 
615  NumberOfSegments = int ( length / SegmentLength); // Number of segments
617 
618 #ifdef TP_DEBUG
619  LogDebug ("Pixel Digitizer")
620  << " enter primary_ionzation " << NumberOfSegments
621  << " shift = "
622  << (hit.exitPoint().x()-hit.entryPoint().x()) << " "
623  << (hit.exitPoint().y()-hit.entryPoint().y()) << " "
624  << (hit.exitPoint().z()-hit.entryPoint().z()) << " "
625  << hit.particleType() <<" "<< hit.pabs() ;
626 #endif
627 
628  float* elossVector = new float[NumberOfSegments]; // Eloss vector
629 
630  if( fluctuateCharge ) {
631  //MP DA RIMUOVERE ASSOLUTAMENTE
632  int pid = hit.particleType();
633  //int pid=211; // assume it is a pion
634 
635  float momentum = hit.pabs();
636  // Generate fluctuated charge points
637  fluctuateEloss(pid, momentum, eLoss, length, NumberOfSegments,
638  elossVector);
639  }
640 
641  _ionization_points.resize( NumberOfSegments); // set size
642 
643  // loop over segments
644  for ( int i = 0; i != NumberOfSegments; i++) {
645  // Divide the segment into equal length subsegments
646  Local3DPoint point = hit.entryPoint() +
647  float((i+0.5)/NumberOfSegments) * direction;
648 
649  if( fluctuateCharge )
650  energy = elossVector[i]/GeVperElectron; // Convert charge to elec.
651  else
652  energy = hit.energyLoss()/GeVperElectron/float(NumberOfSegments);
653 
654  EnergyDepositUnit edu( energy, point); //define position,energy point
655  _ionization_points[i] = edu; // save
656 
657 #ifdef TP_DEBUG
658  LogDebug ("Pixel Digitizer")
659  << i << " " << _ionization_points[i].x() << " "
660  << _ionization_points[i].y() << " "
661  << _ionization_points[i].z() << " "
662  << _ionization_points[i].energy();
663 #endif
664 
665  } // end for loop
666 
667  delete[] elossVector;
668 
669 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
T y() const
Definition: PV3DBase.h:62
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:66
T z() const
Definition: PV3DBase.h:63
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:61
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 461 of file SiPixelDigitizerAlgorithm.cc.

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

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

464  {
465 
466  _detp = pixdet; //cache the PixGeomDetUnit
467  _PixelHits=input; //cache the SimHit
468  _bfield=bfield; //cache the drift direction
469 
470  // Pixel Efficiency moved from the constructor to the method run because
471  // the information of the det are not available in the constructor
472  // Effciency parameters. 0 - no inefficiency, 1-low lumi, 10-high lumi
473 
475 
476  _signal.clear();
477 
478  // initalization of pixeldigisimlinks
479  link_coll.clear();
480 
481  //Digitization of the SimHits of a given pixdet
482  vector<PixelDigi> collector =digitize(pixdet);
483 
484  // edm::DetSet<PixelDigi> collector;
485 
486 #ifdef TP_DEBUG
487  LogDebug ("PixelDigitizer") << "[SiPixelDigitizerAlgorithm] converted " << collector.size() << " PixelDigis in DetUnit" << detID;
488 #endif
489 
490  return collector;
491 }
#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:72

Member Data Documentation

GlobalVector SiPixelDigitizerAlgorithm::_bfield
private

Definition at line 317 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection(), and run().

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

Definition at line 352 of file SiPixelDigitizerAlgorithm.h.

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

const PixelGeomDetUnit* SiPixelDigitizerAlgorithm::_detp
private

Definition at line 307 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection(), and run().

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

Definition at line 351 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and primary_ionization().

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

Definition at line 311 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and run().

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

Definition at line 290 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), and SiPixelDigitizerAlgorithm().

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

Definition at line 291 of file SiPixelDigitizerAlgorithm.h.

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

bool SiPixelDigitizerAlgorithm::addPixelInefficiency
private

Definition at line 293 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 282 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p1
private

Definition at line 283 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p2
private

Definition at line 284 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::BPix_p3
private

Definition at line 285 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

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

Definition at line 358 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 330 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 278 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::FPix_p1
private

Definition at line 279 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::FPix_p2
private

Definition at line 280 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::FPix_p3
private

Definition at line 281 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 314 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and make_digis().

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

Definition at line 316 of file SiPixelDigitizerAlgorithm.h.

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

float SiPixelDigitizerAlgorithm::lorentzAngle
private

Definition at line 276 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and DriftDirection().

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 305 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 349 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and pixel_inefficiency().

float SiPixelDigitizerAlgorithm::PixelChipEff
private

Definition at line 321 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelChipEfficiency
private

Definition at line 324 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelColEff
private

Definition at line 320 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelColEfficiency
private

Definition at line 323 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelEff
private

Definition at line 319 of file SiPixelDigitizerAlgorithm.h.

float SiPixelDigitizerAlgorithm::PixelEfficiency
private

Definition at line 322 of file SiPixelDigitizerAlgorithm.h.

bool SiPixelDigitizerAlgorithm::pixelInefficiency
private

Definition at line 295 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and SiPixelDigitizerAlgorithm().

CLHEP::HepRandomEngine& SiPixelDigitizerAlgorithm::rndEngine
private

Definition at line 389 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 354 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 drift().

CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::smearedChargeDistribution_
private

Definition at line 400 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 300 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 331 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

CLHEP::RandGaussQ* SiPixelDigitizerAlgorithm::theGaussianDistribution
private

Definition at line 403 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 332 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelChipEfficiency[6]
private

Definition at line 327 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelColEfficiency[6]
private

Definition at line 326 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency(), and SiPixelDigitizerAlgorithm().

float SiPixelDigitizerAlgorithm::thePixelEfficiency[6]
private

Definition at line 325 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency(), and SiPixelDigitizerAlgorithm().

int SiPixelDigitizerAlgorithm::thePixelLuminosity
private

Definition at line 296 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 301 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 340 of file SiPixelDigitizerAlgorithm.h.

Referenced by fluctuateEloss(), and SiPixelDigitizerAlgorithm().

const PixelTopology* SiPixelDigitizerAlgorithm::topol
private

Definition at line 312 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and induce_signal().

bool SiPixelDigitizerAlgorithm::use_deadmodule_DB_
private

Definition at line 376 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

bool SiPixelDigitizerAlgorithm::use_ineff_from_db_
private

Definition at line 373 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and pixel_inefficiency_db().

bool SiPixelDigitizerAlgorithm::use_LorentzAngle_DB_
private

Definition at line 377 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and DriftDirection().

bool SiPixelDigitizerAlgorithm::use_module_killing_
private

Definition at line 375 of file SiPixelDigitizerAlgorithm.h.

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