#include <APVShot.h>
Public Member Functions | |
const int | apvNumber () const |
const int | apvNumber () const |
APVShot (const bool zs=true) | |
APVShot () | |
APVShot () | |
APVShot (const std::vector< SiStripDigi > &digis, const DetId &detid, const bool zs=true) | |
APVShot (const bool zs=true) | |
APVShot (const std::vector< SiStripDigi > &digis, const DetId &detid, const bool zs=true) | |
void | computeShot (const std::vector< SiStripDigi > &digis, const DetId &detid, const bool zs=true) |
void | computeShot (const std::vector< SiStripDigi > &digis, const DetId &detid, const bool zs=true) |
const unsigned int | detId () const |
const unsigned int | detId () const |
const bool | isGenuine () const |
const bool | isGenuine () const |
const float | median () const |
const float | median () const |
const int | nStrips () const |
const int | nStrips () const |
const int | subDet () const |
const int | subDet () const |
Private Attributes | |
int | _apv |
DetId | _detid |
float | _median |
int | _nstrips |
bool | _zs |
Static Private Attributes | |
static const int | _threshold = 64 |
APVShot::APVShot | ( | ) |
APVShot::APVShot | ( | const bool | zs = true | ) |
APVShot::APVShot | ( | const std::vector< SiStripDigi > & | digis, |
const DetId & | detid, | ||
const bool | zs = true |
||
) |
Definition at line 13 of file APVShot.cc.
References computeShot().
APVShot::APVShot | ( | ) |
APVShot::APVShot | ( | const bool | zs = true | ) |
APVShot::APVShot | ( | const std::vector< SiStripDigi > & | digis, |
const DetId & | detid, | ||
const bool | zs = true |
||
) |
const int APVShot::apvNumber | ( | ) | const |
const int APVShot::apvNumber | ( | ) | const |
void APVShot::computeShot | ( | const std::vector< SiStripDigi > & | digis, |
const DetId & | detid, | ||
const bool | zs = true |
||
) |
void APVShot::computeShot | ( | const std::vector< SiStripDigi > & | digis, |
const DetId & | detid, | ||
const bool | zs = true |
||
) |
Definition at line 19 of file APVShot.cc.
References _apv, _detid, _median, _nstrips, _zs, DeDxDiscriminatorTools::charge(), cond::rpcobgas::detid, Exception, and python::multivaluedict::sort().
Referenced by APVShot().
{ _zs = zs; _detid = detid; _nstrips = 0; _apv = -1; _median = -1; std::vector<unsigned int> charge; for(std::vector<SiStripDigi>::const_iterator digi=digis.begin();digi!=digis.end();++digi) { if(!_zs || digi->adc()>0) { int oldapv = _apv; _apv = digi->strip()/128; if(oldapv>=0 && oldapv!=_apv) throw cms::Exception("WrongDigiVector") << "Digis from Different APVs" ; charge.push_back(digi->adc()); ++_nstrips; } } // charge to be sorted in descending order std::sort(charge.begin(),charge.end()); std::reverse(charge.begin(),charge.end()); if(charge.size()> 64) { _median = float(charge[64]); } }
const unsigned int APVShot::detId | ( | ) | const |
const unsigned int APVShot::detId | ( | ) | const |
Definition at line 60 of file APVShot.cc.
References _detid, and DetId::rawId().
const bool APVShot::isGenuine | ( | ) | const |
Definition at line 50 of file APVShot.cc.
References _nstrips, and _threshold.
{ return (_nstrips > _threshold); }
const bool APVShot::isGenuine | ( | ) | const |
const float APVShot::median | ( | ) | const |
const float APVShot::median | ( | ) | const |
const int APVShot::nStrips | ( | ) | const |
const int APVShot::nStrips | ( | ) | const |
const int APVShot::subDet | ( | ) | const |
const int APVShot::subDet | ( | ) | const |
Definition at line 58 of file APVShot.cc.
References _detid, and DetId::subdetId().
int APVShot::_apv [private] |
Definition at line 29 of file APVShot.h.
Referenced by apvNumber(), and computeShot().
DetId APVShot::_detid [private] |
Definition at line 32 of file APVShot.h.
Referenced by computeShot(), detId(), and subDet().
float APVShot::_median [private] |
Definition at line 31 of file APVShot.h.
Referenced by computeShot(), and median().
int APVShot::_nstrips [private] |
Definition at line 30 of file APVShot.h.
Referenced by computeShot(), isGenuine(), and nStrips().
const int APVShot::_threshold = 64 [static, private] |
Definition at line 34 of file APVShot.h.
Referenced by isGenuine().
bool APVShot::_zs [private] |
Definition at line 28 of file APVShot.h.
Referenced by computeShot().