New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implimentation of Dual-Slope signal scaling for the Inner Pixel #24325
Merged
cmsbuild
merged 6 commits into
cms-sw:master
from
suchandradutta:Phase2Digitizer_103X_DualSlope_180809
Sep 8, 2018
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5338dfd
Updating Phase2TrackerDigitizerAlgorithm with the option of dual slop…
702fda5
Allowed values for the dual slope parameters updated to enforce the t…
9effc37
Bug fix
d196037
bug fix
60ebbc8
updated Phase2TrackerMonitorDigi.cc having range based loop
61b50f6
Corrected Signal to ADC conversion for the default(TDR) case. ADC ful…
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ class Phase2TrackerDigitizerAlgorithm { | |
const float ClusterWidth; // Gaussian charge cutoff width in sigma units | ||
|
||
//-- make_digis | ||
const bool doDigitalReadout; // Flag to decide analog or digital readout | ||
const int thePhase2ReadoutMode; // Flag to decide readout mode (digital/Analong dual slope etc.) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. analong -> analog |
||
const float theElectronPerADC; // Gain, number of electrons per adc count. | ||
const int theAdcFullScale; // Saturation count, 255=8bit. | ||
const float theNoiseInElectrons; // Noise (RMS) in units of electrons. | ||
|
@@ -209,6 +209,9 @@ class Phase2TrackerDigitizerAlgorithm { | |
//for engine passed into the constructor from Digitizer | ||
CLHEP::HepRandomEngine* rengine_; | ||
|
||
// convert signal in electrons to ADC counts | ||
int convertSignalToAdc(uint32_t detID,float signal_in_elec,float threshold); | ||
|
||
double calcQ(float x) const { | ||
auto xx = std::min(0.5f * x * x,12.5f); | ||
return 0.5 * (1.0-std::copysign(std::sqrt(1.f- unsafe_expf<4>(-xx * (1.f + 0.2733f/(1.f + 0.147f * xx)))), x)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ void Phase2TrackerMonitorDigi::fillITPixelDigiHistos(const edm::Handle<edm::DetS | |
int nclus = 0; | ||
int width = 1; | ||
int position = 0; | ||
std::vector<int> charges; | ||
for (typename edm::DetSet< PixelDigi >::const_iterator di = DSViter->begin(); di != DSViter->end(); di++) { | ||
int col = di->column(); // column | ||
int row = di->row(); // row | ||
|
@@ -149,14 +150,19 @@ void Phase2TrackerMonitorDigi::fillITPixelDigiHistos(const edm::Handle<edm::DetS | |
if (row_last == -1 ) { | ||
position = row+1; | ||
nclus++; | ||
charges.push_back(adc); | ||
} else { | ||
if (abs(row - row_last) == 1 && col == col_last) { | ||
position += row+1; | ||
width++; | ||
charges.push_back(adc); | ||
} else { | ||
position /= width; | ||
local_mes.ClusterWidth->Fill(width); | ||
local_mes.ClusterPosition->Fill(position); | ||
for (std::vector<int>::iterator ic = charges.begin(); ic != charges.end(); ic++) local_mes.ChargeOfDigisVsWidth->Fill((*ic), width); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use range-based loop |
||
charges.clear(); | ||
charges.push_back(adc); | ||
width = 1; | ||
position = row+1; | ||
nclus++; | ||
|
@@ -407,7 +413,6 @@ void Phase2TrackerMonitorDigi::bookLayerHistos(DQMStore::IBooker & ibooker, unsi | |
Parameters.getParameter<int32_t>("Nbins"), | ||
Parameters.getParameter<double>("xmin"), | ||
Parameters.getParameter<double>("xmax")); | ||
|
||
Parameters = config_.getParameter<edm::ParameterSet>("DigiOccupancyPH"); | ||
HistoName.str(""); | ||
HistoName << "DigiOccupancyP_" << fname2.str(); | ||
|
@@ -440,7 +445,6 @@ void Phase2TrackerMonitorDigi::bookLayerHistos(DQMStore::IBooker & ibooker, unsi | |
Parameters.getParameter<double>("xmin"), | ||
Parameters.getParameter<double>("xmax")); | ||
|
||
|
||
Parameters = config_.getParameter<edm::ParameterSet>("NumberOfHitDetsPerLayerH"); | ||
HistoName.str(""); | ||
HistoName << "NumberOfHitDetectorsPerLayer_" << fname2.str(); | ||
|
@@ -456,7 +460,6 @@ void Phase2TrackerMonitorDigi::bookLayerHistos(DQMStore::IBooker & ibooker, unsi | |
Parameters.getParameter<int32_t>("Nbins"), | ||
Parameters.getParameter<double>("xmin"), | ||
Parameters.getParameter<double>("xmax")); | ||
|
||
Parameters = config_.getParameter<edm::ParameterSet>("ClusterWidthH"); | ||
HistoName.str(""); | ||
HistoName << "ClusterWidth_" << fname2.str(); | ||
|
@@ -497,7 +500,7 @@ void Phase2TrackerMonitorDigi::bookLayerHistos(DQMStore::IBooker & ibooker, unsi | |
HistoName << "FractionOfOverThresholdDigisVaEta_" << fname2.str(); | ||
local_mes.FractionOfOvTBitsVsEta= ibooker.bookProfile(HistoName.str(), HistoName.str(), | ||
EtaParameters.getParameter<int32_t>("Nbins"),EtaParameters.getParameter<double>("xmin"),EtaParameters.getParameter<double>("xmax"), | ||
Parameters.getParameter<double>("xmin"),Parameters.getParameter<double>("xmax"),""); | ||
Parameters.getParameter<double>("xmin"),Parameters.getParameter<double>("xmax"),""); | ||
} else { | ||
|
||
Parameters = config_.getParameter<edm::ParameterSet>("DigiChargeH"); | ||
|
@@ -507,10 +510,25 @@ void Phase2TrackerMonitorDigi::bookLayerHistos(DQMStore::IBooker & ibooker, unsi | |
Parameters.getParameter<int32_t>("Nbins"), | ||
Parameters.getParameter<double>("xmin"), | ||
Parameters.getParameter<double>("xmax")); | ||
|
||
edm::ParameterSet WidthParameters = config_.getParameter<edm::ParameterSet>("ClusterWidthH"); | ||
HistoName.str(""); | ||
HistoName << "ChargeOfDigisVsWidth_" << fname2.str(); | ||
local_mes.ChargeOfDigisVsWidth = ibooker.book2D(HistoName.str(),HistoName.str(), | ||
Parameters.getParameter<int32_t>("Nbins"), | ||
Parameters.getParameter<double>("xmin"), | ||
Parameters.getParameter<double>("xmax"), | ||
WidthParameters.getParameter<int32_t>("Nbins"), | ||
WidthParameters.getParameter<double>("xmin"), | ||
WidthParameters.getParameter<double>("xmax")); | ||
|
||
|
||
} | ||
|
||
layerMEs.insert(std::make_pair(layer, local_mes)); | ||
} | ||
} | ||
void Phase2TrackerMonitorDigi::endLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& eSetup){ | ||
} | ||
//define this as a plug-in | ||
DEFINE_FWK_MODULE(Phase2TrackerMonitorDigi); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make a named constant for magic number 10