-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 86827 b: "refs/heads/CMSSW_7_0_X" c: 59c4a1a h: "refs/heads/CMSSW_7_0_X" i: 86825: 24f3ace 86823: 099af58 v: v3
- Loading branch information
Marco De Mattia
committed
Apr 15, 2010
1 parent
263c6e0
commit 3319475
Showing
3 changed files
with
117 additions
and
84 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
refs/heads/gh-pages: 90c10214674639ca7a94515baf184b0cc75e1b69 | ||
"refs/heads/CMSSW_7_0_X": 2ad3d8738eb7a9dd1d33f24ff1b9ef597a13ac04 | ||
"refs/heads/CMSSW_7_0_X": 59c4a1a1bbf137c56cf721f52db71d3f4d5965a6 |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* | ||
* Original Author: gbruno | ||
* Created: Wed Mar 22 12:24:20 CET 2006 | ||
* $Id: SiStripGain.h,v 1.5 2009/11/16 10:06:20 demattia Exp $ | ||
* $Id: SiStripGain.h,v 1.6 2010/03/29 12:32:37 demattia Exp $ | ||
* | ||
* Modifications by M. De Mattia ([email protected]) on 11/11/2009: | ||
* It now holds a std::vector of pointers to ApvGain and a std::vector of corresponding | ||
|
@@ -39,14 +39,16 @@ | |
|
||
#include "CondFormats/SiStripObjects/interface/SiStripApvGain.h" | ||
#include <vector> | ||
#include <memory> | ||
|
||
class SiStripGain | ||
{ | ||
public: | ||
SiStripGain() {}; | ||
virtual ~SiStripGain() {}; | ||
|
||
inline SiStripGain(const SiStripApvGain& apvgain, const double & factor) | ||
inline SiStripGain(const SiStripApvGain& apvgain, const double & factor) : | ||
apvgain_(0) | ||
{ | ||
multiply(apvgain, factor); | ||
} | ||
|
@@ -55,27 +57,24 @@ class SiStripGain | |
void multiply(const SiStripApvGain & apvgain, const double & factor); | ||
|
||
// getters | ||
// For the product of all apvGains | ||
// ------------------------------- | ||
const SiStripApvGain::Range getRange(const uint32_t& detID) const; | ||
float getStripGain(const uint16_t& strip, const SiStripApvGain::Range& range) const; | ||
float getApvGain(const uint16_t& apv, const SiStripApvGain::Range& range) const; | ||
|
||
// For a specific apvGain | ||
// ---------------------- | ||
/** | ||
* This method is kept for compatibility, but it can also be used to get one particular | ||
* set of gain values. By default it will return the first gain, so if there is only | ||
* one it will work like the old version and the old code using it will work. | ||
* The second parameter allows to specify which gain to retrieve, considering that | ||
* they are in input order. | ||
* NOTE that no protection is inside the method (because we want to keep it very light) | ||
* therefore it is the caller duty to check that the index is in the correct range. | ||
*/ | ||
const SiStripApvGain::Range getRange(const uint32_t& detID, const int index = 0) const; | ||
/// Returns a std::vector of ranges for all the gains in the format expected by getStripGain and getApvGain. | ||
const std::vector<SiStripApvGain::Range> getAllRanges(const uint32_t& DetId) const; | ||
const SiStripApvGain::Range getRange(const uint32_t& detID, const int index) const; | ||
float getStripGain(const uint16_t& strip, const SiStripApvGain::Range& range, const int index) const; | ||
float getApvGain(const uint16_t& apv, const SiStripApvGain::Range& range, const int index) const; | ||
|
||
/// Used to get the gain of a specific gain set | ||
float getStripGain(const uint16_t& strip, const SiStripApvGain::Range& range, const int index = 0) const; | ||
/// Used to get the full gain (product of all the gains) | ||
float getStripGain(const uint16_t& strip, const std::vector<SiStripApvGain::Range>& range) const; | ||
/// Used to get the gain of a specific gain set | ||
float getApvGain(const uint16_t& apv, const SiStripApvGain::Range& range, const int index = 0) const; | ||
/// Used to get the full gain (product of all the gains) | ||
float getApvGain(const uint16_t& apv, const std::vector<SiStripApvGain::Range>& rangeVector) const; | ||
/// ATTENTION: we assume the detIds are the same as those from the first gain | ||
void getDetIds(std::vector<uint32_t>& DetIds_) const; | ||
|
||
|
@@ -84,13 +83,17 @@ class SiStripGain | |
|
||
private: | ||
|
||
void fillNewGain(const SiStripApvGain * apvgain, const double & factor, | ||
const SiStripApvGain * apvgain2 = 0, const double & factor2 = 1.); | ||
SiStripGain(const SiStripGain&); // stop default | ||
const SiStripGain& operator=(const SiStripGain&); // stop default | ||
|
||
// ---------- member data -------------------------------- | ||
|
||
std::vector<const SiStripApvGain *> apvgain_; | ||
std::vector<double> norm_; | ||
std::vector<const SiStripApvGain *> apvgainVector_; | ||
std::vector<double> normVector_; | ||
const SiStripApvGain * apvgain_; | ||
std::auto_ptr<SiStripApvGain> apvgainAutoPtr_; | ||
}; | ||
|
||
#endif |
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