CMS 3D CMS Logo

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

#include <APVShotFinder.h>

Public Member Functions

 APVShotFinder (const bool zs=true)
 
 APVShotFinder (const edm::DetSet< SiStripDigi > &digis, const bool zs=true)
 
 APVShotFinder (const edm::DetSetVector< SiStripDigi > &digicoll, const bool zs=true)
 
void computeShots (const edm::DetSet< SiStripDigi > &digis)
 
void computeShots (const edm::DetSetVector< SiStripDigi > &digicoll)
 
const std::vector< APVShot > & getShots () const
 

Private Member Functions

void addShots (const edm::DetSet< SiStripDigi > &digis)
 

Private Attributes

std::vector< APVShot_shots
 
bool _zs
 

Detailed Description

Definition at line 16 of file APVShotFinder.h.

Constructor & Destructor Documentation

◆ APVShotFinder() [1/3]

APVShotFinder::APVShotFinder ( const bool  zs = true)

Definition at line 10 of file APVShotFinder.cc.

10 : _zs(zs), _shots() {}
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31

◆ APVShotFinder() [2/3]

APVShotFinder::APVShotFinder ( const edm::DetSet< SiStripDigi > &  digis,
const bool  zs = true 
)

Definition at line 12 of file APVShotFinder.cc.

References computeShots().

12  : _zs(zs), _shots() {
13  computeShots(digis);
14 }
void computeShots(const edm::DetSet< SiStripDigi > &digis)
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31

◆ APVShotFinder() [3/3]

APVShotFinder::APVShotFinder ( const edm::DetSetVector< SiStripDigi > &  digicoll,
const bool  zs = true 
)

Definition at line 16 of file APVShotFinder.cc.

References computeShots().

16  : _zs(zs), _shots() {
17  computeShots(digicoll);
18 }
void computeShots(const edm::DetSet< SiStripDigi > &digis)
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31

Member Function Documentation

◆ addShots()

void APVShotFinder::addShots ( const edm::DetSet< SiStripDigi > &  digis)
private

Definition at line 33 of file APVShotFinder.cc.

References _shots, _zs, edm::DetSet< T >::begin(), edm::DetSet< T >::detId(), edm::DetSet< T >::end(), and groupFilesInBlocks::temp.

Referenced by computeShots().

33  {
34  DetId detid(digis.detId());
35 
36  int laststrip = -1;
37  int apv = -1;
38  std::vector<SiStripDigi> temp;
39 
40  for (edm::DetSet<SiStripDigi>::const_iterator digi = digis.begin(); digi != digis.end(); digi++) {
41  if (!_zs || digi->adc() > 0) {
42  if (laststrip >= digi->strip())
43  edm::LogWarning("StripNotInOrder") << "Strips not in order in DetSet<SiStripDigi>";
44  laststrip = digi->strip();
45 
46  int newapv = digi->strip() / 128;
47  if (newapv != apv) {
48  if (apv >= 0) {
49  if (temp.size() > 64) {
50  APVShot shot(temp, detid, _zs);
51  _shots.push_back(shot);
52  }
53  temp.clear();
54  }
55  apv = newapv;
56  }
57 
58  temp.push_back(*digi);
59  }
60  }
61  // last strip
62  if (temp.size() > 64) {
63  APVShot shot(temp, detid, _zs);
64  _shots.push_back(shot);
65  }
66  temp.clear();
67 }
iterator end()
Definition: DetSet.h:58
det_id_type detId() const
Definition: DetSet.h:74
iterator begin()
Definition: DetSet.h:57
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31
Definition: DetId.h:17
Definition: APVShot.h:9
collection_type::const_iterator const_iterator
Definition: DetSet.h:31

◆ computeShots() [1/2]

void APVShotFinder::computeShots ( const edm::DetSet< SiStripDigi > &  digis)

Definition at line 20 of file APVShotFinder.cc.

References _shots, and addShots().

Referenced by APVShotFinder().

20  {
21  _shots.clear();
22  addShots(digis);
23 }
void addShots(const edm::DetSet< SiStripDigi > &digis)
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31

◆ computeShots() [2/2]

void APVShotFinder::computeShots ( const edm::DetSetVector< SiStripDigi > &  digicoll)

Definition at line 25 of file APVShotFinder.cc.

References _shots, addShots(), edm::DetSetVector< T >::begin(), edm::DetSetVector< T >::end(), and ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.

25  {
26  _shots.clear();
27 
28  for (edm::DetSetVector<SiStripDigi>::const_iterator it = digicoll.begin(); it != digicoll.end(); ++it) {
29  addShots(*it);
30  }
31 }
void addShots(const edm::DetSet< SiStripDigi > &digis)
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:305
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102

◆ getShots()

const std::vector< APVShot > & APVShotFinder::getShots ( ) const

Definition at line 69 of file APVShotFinder.cc.

References _shots.

Referenced by SiStripMonitorDigi::analyze(), APVShotsAnalyzer::analyze(), SiStripShotFilter::filter(), and APVShotsFilter::filter().

69 { return _shots; }
std::vector< APVShot > _shots
Definition: APVShotFinder.h:31

Member Data Documentation

◆ _shots

std::vector<APVShot> APVShotFinder::_shots
private

Definition at line 31 of file APVShotFinder.h.

Referenced by addShots(), computeShots(), and getShots().

◆ _zs

bool APVShotFinder::_zs
private

Definition at line 30 of file APVShotFinder.h.

Referenced by addShots().