CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ApvAnalysisFactory Class Reference

#include <ApvAnalysisFactory.h>

Public Types

typedef std::map< uint32_t, ApvAnalysisVectorApvAnalysisMap
 
typedef std::vector< ApvAnalysis * > ApvAnalysisVector
 
typedef std::map< ApvAnalysis *, uint32_t > InverseMap
 
typedef std::map< ApvAnalysis *, int > MapNumberingPosition
 

Public Member Functions

 ApvAnalysisFactory (const edm::ParameterSet &pset)
 
 ApvAnalysisFactory (std::string theAlgorithmType, int theNumCMstripsInGroup, int theMaskCalcFlag, float theMaskNoiseCut, float theMaskDeadCut, float theMaskTruncCut, float theCutToAvoidSignal, int theEventInitNumber, int theEventIterNumber)
 
ApvAnalysisVector getApvAnalysis (const uint32_t nDET_ID)
 
void getCommonMode (uint32_t det_id, ApvAnalysis::PedestalType &tmp)
 
std::vector< float > getCommonMode (uint32_t det_id, int apvNumber)
 
void getCommonModeSlope (uint32_t det_id, ApvAnalysis::PedestalType &tmp)
 
float getCommonModeSlope (uint32_t det_id, int apvNumber)
 
void getMask (uint32_t det_id, TkApvMask::MaskType &tmp)
 
void getNoise (uint32_t det_id, ApvAnalysis::PedestalType &noise)
 
void getNoise (uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
 
void getPedestal (uint32_t det_id, ApvAnalysis::PedestalType &peds)
 
void getPedestal (uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
 
void getRawNoise (uint32_t det_id, ApvAnalysis::PedestalType &noise)
 
void getRawNoise (uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
 
std::string getStatus (uint32_t det_id)
 
float getStripNoise (uint32_t det_id, int stripNumber)
 
float getStripPedestal (uint32_t det_id, int stripNumber)
 
float getStripRawNoise (uint32_t det_id, int stripNumber)
 
bool instantiateApvs (uint32_t det_id, int numberOfApvs)
 
bool isUpdating (uint32_t detId)
 
void update (uint32_t det_id, const edm::DetSet< SiStripRawDigi > &in)
 
void updatePair (uint32_t det_id, size_t apvPair, const edm::DetSet< SiStripRawDigi > &in)
 
 ~ApvAnalysisFactory ()
 

Private Member Functions

void constructAuxiliaryApvClasses (ApvAnalysis *theApv, uint32_t det_id, int thisApv)
 
void deleteApv (ApvAnalysis *apv)
 

Private Attributes

ApvAnalysisMap apvMap_
 
std::string theAlgorithmType_
 
std::string theCMType_
 
float theCutToAvoidSignal_
 
int theEventInitNumber_
 
int theEventIterNumber_
 
int theMaskCalcFlag_
 
float theMaskDeadCut_
 
float theMaskNoiseCut_
 
float theMaskTruncCut_
 
int theNumCMstripsInGroup_
 
bool useDB_
 

Detailed Description

Definition at line 22 of file ApvAnalysisFactory.h.

Member Typedef Documentation

◆ ApvAnalysisMap

Definition at line 68 of file ApvAnalysisFactory.h.

◆ ApvAnalysisVector

Definition at line 24 of file ApvAnalysisFactory.h.

◆ InverseMap

typedef std::map<ApvAnalysis*, uint32_t> ApvAnalysisFactory::InverseMap

Definition at line 70 of file ApvAnalysisFactory.h.

◆ MapNumberingPosition

Definition at line 69 of file ApvAnalysisFactory.h.

Constructor & Destructor Documentation

◆ ApvAnalysisFactory() [1/2]

ApvAnalysisFactory::ApvAnalysisFactory ( std::string  theAlgorithmType,
int  theNumCMstripsInGroup,
int  theMaskCalcFlag,
float  theMaskNoiseCut,
float  theMaskDeadCut,
float  theMaskTruncCut,
float  theCutToAvoidSignal,
int  theEventInitNumber,
int  theEventIterNumber 
)

◆ ApvAnalysisFactory() [2/2]

ApvAnalysisFactory::ApvAnalysisFactory ( const edm::ParameterSet pset)

Definition at line 27 of file ApvAnalysisFactory.cc.

27  {
28  theCMType_ = pset.getParameter<string>("CMType");
29  useDB_ = pset.getParameter<bool>("useDB");
30 
31  theAlgorithmType_ = pset.getParameter<string>("CalculatorAlgorithm");
32  theNumCMstripsInGroup_ = pset.getParameter<int>("NumCMstripsInGroup");
33  theMaskCalcFlag_ = pset.getParameter<int>("MaskCalculationFlag");
34 
35  theMaskNoiseCut_ = pset.getParameter<double>("MaskNoiseCut");
36  theMaskDeadCut_ = pset.getParameter<double>("MaskDeadCut");
37  theMaskTruncCut_ = pset.getParameter<double>("MaskTruncationCut");
38  theCutToAvoidSignal_ = pset.getParameter<double>("CutToAvoidSignal");
39 
40  theEventInitNumber_ = pset.getParameter<int>("NumberOfEventsForInit");
41  theEventIterNumber_ = pset.getParameter<int>("NumberOfEventsForIteration");
42  apvMap_.clear();
43 }

References muonDTDigis_cfi::pset.

◆ ~ApvAnalysisFactory()

ApvAnalysisFactory::~ApvAnalysisFactory ( )

Definition at line 45 of file ApvAnalysisFactory.cc.

45  {
46  ApvAnalysisFactory::ApvAnalysisMap::iterator it = apvMap_.begin();
47  for (; it != apvMap_.end(); it++) {
48  vector<ApvAnalysis*>::iterator myApv = (*it).second.begin();
49  for (; myApv != (*it).second.end(); myApv++)
50  deleteApv(*myApv);
51  }
52  apvMap_.clear();
53 }

Member Function Documentation

◆ constructAuxiliaryApvClasses()

void ApvAnalysisFactory::constructAuxiliaryApvClasses ( ApvAnalysis theApv,
uint32_t  det_id,
int  thisApv 
)
private

Definition at line 81 of file ApvAnalysisFactory.cc.

81  {
82  //----------------------------------------------------------------
83  // Create the ped/noise/CMN calculators, zero suppressors etc.
84  // (Is called by addDetUnitAndConstructApvs()).
85  //
86  // N.B. Don't call this twice for the same APV!
87  //-----------------------------------------------------------------
88  // cout<<"VirtualApvAnalysisFactory::constructAuxiliaryApvClasses"<<endl;
89  TkPedestalCalculator* thePedestal = nullptr;
90  TkNoiseCalculator* theNoise = nullptr;
91  TkApvMask* theMask = nullptr;
92  TkCommonModeCalculator* theCM = nullptr;
93 
94  TkCommonMode* theCommonMode = new TkCommonMode();
96  theCommonMode->setTopology(theTopology);
97 
98  // Create desired algorithms.
99  if (theAlgorithmType_ == "TT6") {
103  theCM = new TT6CommonModeCalculator(theNoise, theMask, theCutToAvoidSignal_);
104  } else if ("TT6NT" == theAlgorithmType_) {
107  thePedestal = new TT6NTPedestalCalculator;
108  theCM = new TT6CommonModeCalculator(theNoise, theMask, theCutToAvoidSignal_);
109  } else if (theAlgorithmType_ == "MIX") {
110  // the mask as to be defined also for SimplePedCalculator
112 
114 
116 
117  if (theCMType_ == "Median") {
118  theCM = new MedianCommonModeCalculator();
119  } else {
120  cout << "Sorry Only Median is available for now, Mean and FastLinear are coming soon" << endl;
121  }
122  }
123 
124  if (theCommonMode)
125  theCM->setCM(theCommonMode);
126  if (thePedestal)
127  theAPV->setPedestalCalculator(*thePedestal);
128  if (theNoise)
129  theAPV->setNoiseCalculator(*theNoise);
130  if (theMask)
131  theAPV->setMask(*theMask);
132  if (theCM)
133  theAPV->setCommonModeCalculator(*theCM);
134 }

References gather_cfg::cout, TkCommonModeCalculator::setCM(), ApvAnalysis::setCommonModeCalculator(), ApvAnalysis::setMask(), ApvAnalysis::setNoiseCalculator(), ApvAnalysis::setPedestalCalculator(), and TkCommonMode::setTopology().

◆ deleteApv()

void ApvAnalysisFactory::deleteApv ( ApvAnalysis apv)
private

Definition at line 353 of file ApvAnalysisFactory.cc.

353  {
354  delete &(apv->pedestalCalculator());
355  delete &(apv->noiseCalculator());
356  delete &(apv->mask());
357  delete &(apv->commonModeCalculator().commonMode()->topology());
358  delete (apv->commonModeCalculator().commonMode());
359  delete &(apv->commonModeCalculator());
360  delete apv;
361 }

References TkCommonModeCalculator::commonMode(), ApvAnalysis::commonModeCalculator(), ApvAnalysis::mask(), ApvAnalysis::noiseCalculator(), ApvAnalysis::pedestalCalculator(), and TkCommonMode::topology().

◆ getApvAnalysis()

std::vector< ApvAnalysis * > ApvAnalysisFactory::getApvAnalysis ( const uint32_t  nDET_ID)

Definition at line 75 of file ApvAnalysisFactory.cc.

75  {
76  ApvAnalysisMap::const_iterator _apvAnalysisIter = apvMap_.find(nDET_ID);
77 
78  return apvMap_.end() != _apvAnalysisIter ? _apvAnalysisIter->second : std::vector<ApvAnalysis*>();
79 }

Referenced by NoiseTask::book().

◆ getCommonMode() [1/2]

void ApvAnalysisFactory::getCommonMode ( uint32_t  det_id,
ApvAnalysis::PedestalType tmp 
)

Definition at line 311 of file ApvAnalysisFactory.cc.

311  {
312  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
313  if (apvAnalysisIt != apvMap_.end()) {
314  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
315  for (unsigned int i = 0; i < theApvs.size(); i++) {
316  //To be fixed. We return only the first one in the vector.
317  vector<float> tmp_cm = theApvs[i]->commonModeCalculator().commonMode()->returnAsVector();
318  for (unsigned int it = 0; it < tmp_cm.size(); it++)
319  tmp.push_back(tmp_cm[it]);
320  }
321  }
322 }

References mps_fire::i, and createJobs::tmp.

Referenced by SiStripMonitorPedestals::analyze(), and NoiseTask::update().

◆ getCommonMode() [2/2]

vector< float > ApvAnalysisFactory::getCommonMode ( uint32_t  det_id,
int  apvNumber 
)

Definition at line 300 of file ApvAnalysisFactory.cc.

300  {
301  vector<float> tmp;
302  tmp.clear();
303  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
304  if (theApvs_map != apvMap_.end()) {
305  vector<ApvAnalysis*> theApvs = theApvs_map->second;
306 
307  tmp = theApvs[apvNumber]->commonModeCalculator().commonMode()->returnAsVector();
308  }
309  return tmp;
310 }

References createJobs::tmp.

◆ getCommonModeSlope() [1/2]

void ApvAnalysisFactory::getCommonModeSlope ( uint32_t  det_id,
ApvAnalysis::PedestalType tmp 
)

Definition at line 375 of file ApvAnalysisFactory.cc.

375  {
376  tmp.clear();
377  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
378  if (apvAnalysisIt != apvMap_.end()) {
379  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
380  for (unsigned int i = 0; i < theApvs.size(); i++) {
381  tmp.push_back(theApvs[i]->commonModeCalculator().getCMSlope());
382  }
383  }
384 }

References mps_fire::i, and createJobs::tmp.

Referenced by SiStripMonitorPedestals::analyze().

◆ getCommonModeSlope() [2/2]

float ApvAnalysisFactory::getCommonModeSlope ( uint32_t  det_id,
int  apvNumber 
)

Definition at line 365 of file ApvAnalysisFactory.cc.

365  {
366  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
367  float tmp = -100.0;
368  if (theApvs_map != apvMap_.end()) {
369  vector<ApvAnalysis*> theApvs = theApvs_map->second;
370  tmp = theApvs[apvNumber]->commonModeCalculator().getCMSlope();
371  return tmp;
372  }
373  return tmp;
374 }

References createJobs::tmp.

◆ getMask()

void ApvAnalysisFactory::getMask ( uint32_t  det_id,
TkApvMask::MaskType tmp 
)

Definition at line 324 of file ApvAnalysisFactory.cc.

324  {
325  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(det_id);
326  if (apvAnalysisIt != apvMap_.end()) {
327  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
328  for (unsigned int i = 0; i < theApvs.size(); i++) {
329  TkApvMask::MaskType theMaskType = (theApvs[i]->mask()).mask();
330  //cout <<"theMaskType size "<<theMaskType.size()<<endl;
331 
332  for (unsigned int ii = 0; ii < theMaskType.size(); ii++) {
333  tmp.push_back(theMaskType[ii]);
334  //cout <<"The Value "<<theMaskType[ii]<<" "<<ii<<endl;
335  }
336  }
337  }
338 }

References mps_fire::i, cuy::ii, and createJobs::tmp.

Referenced by SiStripMonitorPedestals::analyze().

◆ getNoise() [1/2]

void ApvAnalysisFactory::getNoise ( uint32_t  det_id,
ApvAnalysis::PedestalType noise 
)

Definition at line 251 of file ApvAnalysisFactory.cc.

251  {
252  //Get the pedestal for a given apv
253  peds.clear();
254  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
255  if (theApvs_map != apvMap_.end()) {
256  vector<ApvAnalysis*>::const_iterator theApvs = (theApvs_map->second).begin();
257  for (; theApvs != (theApvs_map->second).end(); theApvs++) {
258  ApvAnalysis::PedestalType tmp = (*theApvs)->noiseCalculator().noise();
259  for (ApvAnalysis::PedestalType::const_iterator pit = tmp.begin(); pit != tmp.end(); pit++)
260  peds.push_back(*pit);
261  }
262  }
263 }

References mps_fire::end, and createJobs::tmp.

◆ getNoise() [2/2]

void ApvAnalysisFactory::getNoise ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType noise 
)

Definition at line 230 of file ApvAnalysisFactory.cc.

230  {
231  //Get the pedestal for a given apv
232  noise.clear();
233  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
234  if (apvAnalysisIt != apvMap_.end()) {
235  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
236 
237  noise = theApvs[apvNumber]->noiseCalculator().noise();
238  }
239 }

References gpuVertexFinder::noise.

Referenced by SiStripMonitorPedestals::analyze(), and NoiseTask::update().

◆ getPedestal() [1/2]

void ApvAnalysisFactory::getPedestal ( uint32_t  det_id,
ApvAnalysis::PedestalType peds 
)

Definition at line 208 of file ApvAnalysisFactory.cc.

208  {
209  //Get the pedestal for a given apv
210  peds.clear();
211  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
212  if (apvAnalysisIt != apvMap_.end()) {
213  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
214  for (vector<ApvAnalysis*>::const_iterator it = theApvs.begin(); it != theApvs.end(); it++) {
215  ApvAnalysis::PedestalType tmp = (*it)->pedestalCalculator().pedestal();
216  for (ApvAnalysis::PedestalType::const_iterator pit = tmp.begin(); pit != tmp.end(); pit++)
217  peds.push_back(*pit);
218  }
219  }
220 }

References createJobs::tmp.

◆ getPedestal() [2/2]

void ApvAnalysisFactory::getPedestal ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType peds 
)

Definition at line 198 of file ApvAnalysisFactory.cc.

198  {
199  //Get the pedestal for a given apv
200  peds.clear();
201  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
202  if (apvAnalysisIt != apvMap_.end()) {
203  vector<ApvAnalysis*> myApvs = apvAnalysisIt->second;
204  peds = myApvs[apvNumber]->pedestalCalculator().pedestal();
205  }
206 }

Referenced by SiStripMonitorPedestals::analyze(), PedsOnlyTask::update(), and NoiseTask::update().

◆ getRawNoise() [1/2]

void ApvAnalysisFactory::getRawNoise ( uint32_t  det_id,
ApvAnalysis::PedestalType noise 
)

Definition at line 286 of file ApvAnalysisFactory.cc.

286  {
287  //Get the pedestal for a given apv
288  peds.clear();
289  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
290  if (theApvs_map != apvMap_.end()) {
291  vector<ApvAnalysis*>::const_iterator theApvs = (theApvs_map->second).begin();
292  for (; theApvs != (theApvs_map->second).end(); theApvs++) {
293  ApvAnalysis::PedestalType tmp = (*theApvs)->pedestalCalculator().rawNoise();
294  for (ApvAnalysis::PedestalType::const_iterator pit = tmp.begin(); pit != tmp.end(); pit++)
295  peds.push_back(*pit);
296  }
297  }
298 }

References mps_fire::end, and createJobs::tmp.

◆ getRawNoise() [2/2]

void ApvAnalysisFactory::getRawNoise ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType noise 
)

Definition at line 265 of file ApvAnalysisFactory.cc.

265  {
266  //Get the pedestal for a given apv
267  noise.clear();
268  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
269  if (apvAnalysisIt != apvMap_.end()) {
270  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
271 
272  noise = theApvs[apvNumber]->pedestalCalculator().rawNoise();
273  }
274 }

References gpuVertexFinder::noise.

Referenced by SiStripMonitorPedestals::analyze(), and PedsOnlyTask::update().

◆ getStatus()

std::string ApvAnalysisFactory::getStatus ( uint32_t  det_id)

◆ getStripNoise()

float ApvAnalysisFactory::getStripNoise ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 241 of file ApvAnalysisFactory.cc.

241  {
242  //Get the pedestal for a given apv
244  int apvNumb = int(stripNumber / 128.);
245  int stripN = (stripNumber - apvNumb * 128);
246 
247  getNoise(detId, apvNumb, temp);
248  return temp[stripN];
249 }

References createfilelist::int, and groupFilesInBlocks::temp.

◆ getStripPedestal()

float ApvAnalysisFactory::getStripPedestal ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 221 of file ApvAnalysisFactory.cc.

221  {
222  //Get the pedestal for a given apv
224  int apvNumb = int(stripNumber / 128.);
225  int stripN = (stripNumber - apvNumb * 128);
226 
227  getPedestal(detId, apvNumb, temp);
228  return temp[stripN];
229 }

References createfilelist::int, and groupFilesInBlocks::temp.

◆ getStripRawNoise()

float ApvAnalysisFactory::getStripRawNoise ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 276 of file ApvAnalysisFactory.cc.

276  {
277  //Get the pedestal for a given apv
279  int apvNumb = int(stripNumber / 128.);
280  int stripN = (stripNumber - apvNumb * 128);
281 
282  getRawNoise(detId, apvNumb, temp);
283  return temp[stripN];
284 }

References createfilelist::int, and groupFilesInBlocks::temp.

◆ instantiateApvs()

bool ApvAnalysisFactory::instantiateApvs ( uint32_t  det_id,
int  numberOfApvs 
)

Definition at line 57 of file ApvAnalysisFactory.cc.

57  {
58  ApvAnalysisFactory::ApvAnalysisMap::iterator CPos = apvMap_.find(detId);
59  if (CPos != apvMap_.end()) {
60  cout << " APVs for Detector Id " << detId << " already created !!!" << endl;
61  ;
62  return false;
63  }
64  vector<ApvAnalysis*> temp;
65  for (int i = 0; i < numberOfApvs; i++) {
67  // constructAuxiliaryApvClasses(apvTmp);
68  constructAuxiliaryApvClasses(apvTmp, detId, i);
69  temp.push_back(apvTmp);
70  }
71  apvMap_.insert(pair<uint32_t, vector<ApvAnalysis*> >(detId, temp));
72  return true;
73 }

References gather_cfg::cout, mps_fire::i, and groupFilesInBlocks::temp.

Referenced by PedsOnlyTask::book(), NoiseTask::book(), and SiStripMonitorPedestals::createMEs().

◆ isUpdating()

bool ApvAnalysisFactory::isUpdating ( uint32_t  detId)

Definition at line 339 of file ApvAnalysisFactory.cc.

339  {
340  bool updating = true;
341  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
342  if (apvAnalysisIt != apvMap_.end()) {
343  for (vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin();
344  apvIt != (apvAnalysisIt->second).end();
345  apvIt++) {
346  if (!((*apvIt)->pedestalCalculator().status()->isUpdating()))
347  updating = false;
348  }
349  }
350  return updating;
351 }

References mps_fire::end.

◆ update()

void ApvAnalysisFactory::update ( uint32_t  det_id,
const edm::DetSet< SiStripRawDigi > &  in 
)

Definition at line 171 of file ApvAnalysisFactory.cc.

171  {
172  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
173  if (apvAnalysisIt != apvMap_.end()) {
174  size_t i = 0;
175  for (vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin();
176  apvIt != (apvAnalysisIt->second).end();
177  apvIt++) {
178  edm::DetSet<SiStripRawDigi> tmpRawDigi;
179  //it is missing the detId ...
180  tmpRawDigi.data.reserve(128);
181  size_t startStrip = 128 * i;
182  size_t stopStrip = startStrip + 128;
183 
184  for (size_t istrip = startStrip; istrip < stopStrip; istrip++) {
185  if (in.data.size() <= istrip)
186  tmpRawDigi.data.push_back(SiStripRawDigi(0));
187  else
188  tmpRawDigi.data.push_back(in.data[istrip]); //maybe dangerous
189  }
190 
191  (*apvIt)->newEvent();
192  (*apvIt)->updateCalibration(tmpRawDigi);
193  i++;
194  }
195  }
196 }

References edm::DetSet< T >::data, mps_fire::end, mps_fire::i, and recoMuon::in.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), SiStripMonitorPedestals::analyze(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

◆ updatePair()

void ApvAnalysisFactory::updatePair ( uint32_t  det_id,
size_t  apvPair,
const edm::DetSet< SiStripRawDigi > &  in 
)

Definition at line 136 of file ApvAnalysisFactory.cc.

136  {
137  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
138  if (apvAnalysisIt != apvMap_.end()) {
139  size_t iter = 0;
140 
141  for (vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin();
142  apvIt != (apvAnalysisIt->second).end();
143  apvIt++) {
144  if (iter == pairNumber * 2 || iter == (2 * pairNumber + 1)) {
145  // cout << "ApvAnalysisFactory::updatePair pair number " << pairNumber << endl;
146  // cout << "ApvAnlysis will be updated for the apv # " << iter << endl;
147 
148  edm::DetSet<SiStripRawDigi> tmpRawDigi;
149  tmpRawDigi.data.reserve(128);
150 
151  size_t startStrip = 128 * (iter % 2);
152  size_t stopStrip = startStrip + 128;
153 
154  for (size_t istrip = startStrip; istrip < stopStrip; istrip++) {
155  if (in.data.size() <= istrip)
156  tmpRawDigi.data.push_back(SiStripRawDigi(0));
157  else
158  tmpRawDigi.data.push_back(in.data[istrip]); //maybe dangerous
159  }
160 
161  (*apvIt)->newEvent();
162  (*apvIt)->updateCalibration(tmpRawDigi);
163  }
164 
165  iter++;
166  }
167  }
168 
169 } // void

References edm::DetSet< T >::data, mps_fire::end, and recoMuon::in.

Referenced by PedsOnlyTask::fill(), and NoiseTask::fill().

Member Data Documentation

◆ apvMap_

ApvAnalysisMap ApvAnalysisFactory::apvMap_
private

Definition at line 76 of file ApvAnalysisFactory.h.

◆ theAlgorithmType_

std::string ApvAnalysisFactory::theAlgorithmType_
private

Definition at line 77 of file ApvAnalysisFactory.h.

◆ theCMType_

std::string ApvAnalysisFactory::theCMType_
private

Definition at line 86 of file ApvAnalysisFactory.h.

◆ theCutToAvoidSignal_

float ApvAnalysisFactory::theCutToAvoidSignal_
private

Definition at line 83 of file ApvAnalysisFactory.h.

◆ theEventInitNumber_

int ApvAnalysisFactory::theEventInitNumber_
private

Definition at line 84 of file ApvAnalysisFactory.h.

◆ theEventIterNumber_

int ApvAnalysisFactory::theEventIterNumber_
private

Definition at line 85 of file ApvAnalysisFactory.h.

◆ theMaskCalcFlag_

int ApvAnalysisFactory::theMaskCalcFlag_
private

Definition at line 79 of file ApvAnalysisFactory.h.

◆ theMaskDeadCut_

float ApvAnalysisFactory::theMaskDeadCut_
private

Definition at line 81 of file ApvAnalysisFactory.h.

◆ theMaskNoiseCut_

float ApvAnalysisFactory::theMaskNoiseCut_
private

Definition at line 80 of file ApvAnalysisFactory.h.

◆ theMaskTruncCut_

float ApvAnalysisFactory::theMaskTruncCut_
private

Definition at line 82 of file ApvAnalysisFactory.h.

◆ theNumCMstripsInGroup_

int ApvAnalysisFactory::theNumCMstripsInGroup_
private

Definition at line 78 of file ApvAnalysisFactory.h.

◆ useDB_

bool ApvAnalysisFactory::useDB_
private

Definition at line 87 of file ApvAnalysisFactory.h.

TkPedestalCalculator
Definition: TkPedestalCalculator.h:9
ApvAnalysisFactory::getNoise
void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
Definition: ApvAnalysisFactory.cc:230
ApvAnalysisFactory::apvMap_
ApvAnalysisMap apvMap_
Definition: ApvAnalysisFactory.h:76
MedianCommonModeCalculator
Definition: MedianCommonModeCalculator.h:11
ApvAnalysisFactory::theEventInitNumber_
int theEventInitNumber_
Definition: ApvAnalysisFactory.h:84
mps_fire.i
i
Definition: mps_fire.py:428
TkApvMask::MaskType
std::vector< StripMaskType > MaskType
Definition: TkApvMask.h:15
ApvAnalysis::commonModeCalculator
TkCommonModeCalculator & commonModeCalculator()
Definition: ApvAnalysis.h:58
edm::DetSet
Definition: DetSet.h:23
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TkApvMask
Definition: TkApvMask.h:9
ApvAnalysisFactory::theMaskTruncCut_
float theMaskTruncCut_
Definition: ApvAnalysisFactory.h:82
TkNoiseCalculator
Definition: TkNoiseCalculator.h:10
ApvAnalysisFactory::deleteApv
void deleteApv(ApvAnalysis *apv)
Definition: ApvAnalysisFactory.cc:353
TkCommonMode
Definition: TkCommonMode.h:13
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
ApvAnalysisFactory::getPedestal
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
Definition: ApvAnalysisFactory.cc:198
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
TT6CommonModeCalculator
Definition: TT6CommonModeCalculator.h:11
SiStripRawDigi
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
Definition: SiStripRawDigi.h:15
ApvAnalysis::pedestalCalculator
TkPedestalCalculator & pedestalCalculator()
Definition: ApvAnalysis.h:59
TkCommonModeTopology
Definition: TkCommonModeTopology.h:8
mps_fire.end
end
Definition: mps_fire.py:242
ApvAnalysisFactory::useDB_
bool useDB_
Definition: ApvAnalysisFactory.h:87
SimpleNoiseCalculator
Definition: SimpleNoiseCalculator.h:9
TT6NoiseCalculator
Definition: TT6NoiseCalculator.h:9
ApvAnalysisFactory::theAlgorithmType_
std::string theAlgorithmType_
Definition: ApvAnalysisFactory.h:77
ApvAnalysisFactory::theMaskNoiseCut_
float theMaskNoiseCut_
Definition: ApvAnalysisFactory.h:80
TkCommonModeCalculator::setCM
virtual void setCM(TkCommonMode *)=0
TkCommonMode::setTopology
virtual void setTopology(TkCommonModeTopology *in)
Definition: TkCommonMode.h:18
TT6NTPedestalCalculator
Definition: TT6NTPedestalCalculator.h:18
TT6ApvMask
Definition: TT6ApvMask.h:10
recoMuon::in
Definition: RecoMuonEnumerators.h:6
TT6PedestalCalculator
Definition: TT6PedestalCalculator.h:10
ApvAnalysisFactory::getRawNoise
void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
Definition: ApvAnalysisFactory.cc:265
createfilelist.int
int
Definition: createfilelist.py:10
ApvAnalysis
Definition: ApvAnalysis.h:37
gpuVertexFinder::noise
__shared__ int noise
Definition: gpuFitVertices.h:50
ApvAnalysisFactory::theCMType_
std::string theCMType_
Definition: ApvAnalysisFactory.h:86
SimplePedestalCalculator
Definition: SimplePedestalCalculator.h:10
ApvAnalysisFactory::theCutToAvoidSignal_
float theCutToAvoidSignal_
Definition: ApvAnalysisFactory.h:83
ApvAnalysis::noiseCalculator
TkNoiseCalculator & noiseCalculator()
Definition: ApvAnalysis.h:60
TkCommonModeCalculator
Definition: TkCommonModeCalculator.h:9
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
ApvAnalysis::mask
TkApvMask & mask()
Definition: ApvAnalysis.h:61
ApvAnalysis::PedestalType
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
TkCommonModeCalculator::commonMode
virtual TkCommonMode * commonMode()=0
ApvAnalysisFactory::theMaskDeadCut_
float theMaskDeadCut_
Definition: ApvAnalysisFactory.h:81
ApvAnalysisFactory::theEventIterNumber_
int theEventIterNumber_
Definition: ApvAnalysisFactory.h:85
ApvAnalysisFactory::theMaskCalcFlag_
int theMaskCalcFlag_
Definition: ApvAnalysisFactory.h:79
cuy.ii
ii
Definition: cuy.py:589
TkCommonMode::topology
virtual TkCommonModeTopology & topology()
Definition: TkCommonMode.h:17
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
ApvAnalysisFactory::theNumCMstripsInGroup_
int theNumCMstripsInGroup_
Definition: ApvAnalysisFactory.h:78
ApvAnalysisFactory::constructAuxiliaryApvClasses
void constructAuxiliaryApvClasses(ApvAnalysis *theApv, uint32_t det_id, int thisApv)
Definition: ApvAnalysisFactory.cc:81