|
ATLAS Offline Software
|
#include <CSC_Digitizer.h>
|
| CSC_Digitizer (const CscHitIdHelper *cscHitHelper, const MuonGM::MuonDetectorManager *muonMgr, ICscCalibTool *pcalib) |
|
| ~CSC_Digitizer ()=default |
|
StatusCode | initialize () |
|
void | setWindow (const double t1, const double t2) |
|
void | set (const double bunchTime) |
|
void | setAmplification (const double amplification) |
|
void | setDebug (int debug) |
|
void | setDriftVelocity (double v0) |
|
void | setElectronEnergy (double e) |
|
void | setNInterFixed () |
|
StatusCode | digitize_hit (const CSCSimHit *cscHit, std::vector< IdentifierHash > &hashVec, std::map< IdentifierHash, std::pair< double, double > > &data_map, CLHEP::HepRandomEngine *rndmEngine) |
|
StatusCode | digitize_hit (const CSCSimHit *cscHit, std::vector< IdentifierHash > &hashVec, std::map< IdentifierHash, std::vector< float > > &data_SampleMap, std::map< IdentifierHash, std::vector< float > > &data_SampleMapOddPhase, CLHEP::HepRandomEngine *rndmEngine) |
|
StatusCode | digitize_hit (const CSCSimHit *cscHit, std::vector< IdentifierHash > &hashVec, std::map< IdentifierHash, std::vector< float > > &data_SampleMap, CLHEP::HepRandomEngine *rndmEngine) |
|
IdentifierHash | getHashId (const Identifier &input_id, const int stripId, const int measuresPhi) const |
|
|
double | qWire (const int &nElectrons, const double &gammaDist) const |
|
double | qStripR (const double x, const Identifier &id) const |
| Charge sharing profile. More...
|
|
double | qStripPhi (const double x, const Identifier &id) const |
|
double | getDriftTime (const MuonGM::CscReadoutElement *descriptor, const Amg::Vector3D &pos) const |
|
bool | outsideWindow (double time) const |
|
void | fillMaps (const IdentifierHash hash, const double driftTime, const double stripCharge, std::vector< IdentifierHash > &hashVec, std::map< IdentifierHash, std::pair< double, double > > &data_map) |
|
void | fillSampleMaps (const IdentifierHash hash, const double driftTime, const double stripCharge, std::vector< IdentifierHash > &hashVec, std::map< IdentifierHash, std::vector< float > > &data_map, bool phase=0) |
|
Identifier | to_identifier (const CSCSimHit *cscHit) const |
|
Definition at line 37 of file CSC_Digitizer.h.
◆ CSC_Digitizer()
◆ ~CSC_Digitizer()
CSC_Digitizer::~CSC_Digitizer |
( |
| ) |
|
|
default |
◆ digitize_hit() [1/3]
StatusCode CSC_Digitizer::digitize_hit |
( |
const CSCSimHit * |
cscHit, |
|
|
std::vector< IdentifierHash > & |
hashVec, |
|
|
std::map< IdentifierHash, std::pair< double, double > > & |
data_map, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
◆ digitize_hit() [2/3]
StatusCode CSC_Digitizer::digitize_hit |
( |
const CSCSimHit * |
cscHit, |
|
|
std::vector< IdentifierHash > & |
hashVec, |
|
|
std::map< IdentifierHash, std::vector< float > > & |
data_SampleMap, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
◆ digitize_hit() [3/3]
StatusCode CSC_Digitizer::digitize_hit |
( |
const CSCSimHit * |
cscHit, |
|
|
std::vector< IdentifierHash > & |
hashVec, |
|
|
std::map< IdentifierHash, std::vector< float > > & |
data_SampleMap, |
|
|
std::map< IdentifierHash, std::vector< float > > & |
data_SampleMapOddPhase, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
◆ fillMaps()
Definition at line 709 of file CSC_Digitizer.cxx.
711 if (stripCharge == 0.0)
return;
714 if (data_map.find(hashId) != data_map.end()) {
721 std::cout <<
"[CSC_Digitizer::fillMaps] (" << data_map[hashId].first <<
":" <<
int(data_map[hashId].
second) <<
")"
723 <<
" ==> " <<
result.first <<
":" <<
int(
result.second) <<
" e- which was "
724 <<
int(data_map[hashId].
second + stripCharge) << std::endl;
726 data_map[hashId].first =
result.first;
727 data_map[hashId].second =
result.second;
731 data_map[hashId].second = stripCharge;
732 hashVec.push_back(hashId);
◆ fillSampleMaps()
Definition at line 556 of file CSC_Digitizer.cxx.
559 if (stripCharge == 0.0)
return;
562 if (data_map.find(hashId) != data_map.end()) {
563 float phaseOffset = (
phase) ? +25 : 0;
565 std::vector<float> existingSamples = data_map[hashId];
568 std::cout <<
"[CSC_Digitizer::fillSampleMaps] ";
570 for (
unsigned int i = 0;
i < samples.size(); ++
i) std::cout << samples[
i] <<
" ";
573 for (
unsigned int i = 0;
i < existingSamples.size(); ++
i) std::cout << existingSamples[
i] <<
" ";
575 std::cout <<
" ==> ";
578 for (
unsigned int i = 0;
i < samples.size(); ++
i) { existingSamples[
i] += samples[
i]; }
581 for (
unsigned int i = 0;
i < existingSamples.size(); ++
i) std::cout << existingSamples[
i] <<
" ";
582 std::cout << std::endl;
585 data_map[hashId] = existingSamples;
589 hashVec.push_back(hashId);
◆ fparamPhi()
double CSC_Digitizer::fparamPhi |
( |
const double |
x, |
|
|
const std::array< double, 9 > & |
p |
|
) |
| |
|
staticprivate |
◆ getDriftTime()
Definition at line 681 of file CSC_Digitizer.cxx.
684 double time = -1000.0;
691 float yy =
pos.y() + longWidth * 0.5;
693 int wire =
int(
yy / anodeCathodeDist) + 1;
694 float y0 = (
yy - wire * anodeCathodeDist);
695 if (std::abs(y0) > anodeCathodeDist / 2) y0 = std::abs(y0) - anodeCathodeDist * 0.5;
696 float driftDist = std::hypot(x0, y0);
◆ getHashId()
Definition at line 736 of file CSC_Digitizer.cxx.
740 IdentifierHash hashId;
742 throw std::runtime_error(
743 Form(
"File: %s, Line: %d\nCSC_Digitizer::getHashId() - Failed to retrieve channel hash from identifier %llu", __FILE__,
744 __LINE__, realHitId.get_compact()));
◆ initialize()
StatusCode CSC_Digitizer::initialize |
( |
| ) |
|
Definition at line 31 of file CSC_Digitizer.cxx.
39 static constexpr std::array<double, s_maxElectron>
prob{79.4, 12., 3.4, 1.6, 0.95, 0.6, 0.44, 0.34, 0.27, 0.21, 0.17,
40 0.13, 0.1, 0.08, 0.06, 0.05, 0.042, 0.037, 0.033, 0.029, 0.};
48 return StatusCode::SUCCESS;
◆ outsideWindow()
bool CSC_Digitizer::outsideWindow |
( |
double |
time | ) |
const |
|
private |
◆ qStripPhi()
Definition at line 649 of file CSC_Digitizer.cxx.
651 static constexpr std::array<double, 9> pSmall{.9092, .0634, -1.051, 8.05, -35.477, 58.883, -46.111, 17.446, -2.5824};
652 static constexpr std::array<double, 9> pLarge{.98, -.36, 5.07, -27.81, 72.257, -99.456, 72.778, -26.779, 3.9054};
653 double xx = std::abs(
x) / 10.0;
654 double phiStripCharge = 0.0;
664 return phiStripCharge;
◆ qStripR() [1/2]
double CSC_Digitizer::qStripR |
( |
const double |
x | ) |
|
|
staticprivate |
Definition at line 618 of file CSC_Digitizer.cxx.
622 double rStripCharge = 0.0;
623 static constexpr std::array<double,4> Par{0.185, 2.315, 0.48, 5.2};
624 double xx = std::abs(
x) / 10.0;
626 rStripCharge = Par[0] *
exp(-Par[1] * xx) + Par[2] *
exp(-Par[3] * (xx * xx));
◆ qStripR() [2/2]
Charge sharing profile.
New implementation Jan 2012 from fit to segment hits in run 186049.
- Parameters
-
x | distance between strip and hit center in strip widths |
stationType | small or large chamber |
- Returns
- the charge fraction for this strip
Definition at line 637 of file CSC_Digitizer.cxx.
638 double stripCharge = 0.0;
642 stripCharge = 0.7001 / (1.0 + 1.38 * xx + 2.255 * xx * xx);
644 stripCharge = 0.7 / (1.0 + 1.381 * xx + 2.248 * xx * xx);
◆ qWire()
double CSC_Digitizer::qWire |
( |
const int & |
nElectrons, |
|
|
const double & |
gammaDist |
|
) |
| const |
|
private |
Definition at line 602 of file CSC_Digitizer.cxx.
607 double wireCharge = 0.0;
609 for (
int i = 0;
i < nElectrons; ++
i) {
612 wireCharge += amplification * RNDpol;
◆ set()
void CSC_Digitizer::set |
( |
const double |
bunchTime | ) |
|
◆ setAmplification()
void CSC_Digitizer::setAmplification |
( |
const double |
amplification | ) |
|
|
inline |
◆ setDebug()
void CSC_Digitizer::setDebug |
( |
int |
debug | ) |
|
|
inline |
◆ setDriftVelocity()
void CSC_Digitizer::setDriftVelocity |
( |
double |
v0 | ) |
|
|
inline |
◆ setElectronEnergy()
void CSC_Digitizer::setElectronEnergy |
( |
double |
e | ) |
|
|
inline |
◆ setNInterFixed()
void CSC_Digitizer::setNInterFixed |
( |
| ) |
|
|
inline |
◆ setWindow()
void CSC_Digitizer::setWindow |
( |
const double |
t1, |
|
|
const double |
t2 |
|
) |
| |
◆ to_identifier()
Definition at line 51 of file CSC_Digitizer.cxx.
52 const int hitId = cscHit->
CSCid();
56 throw std::runtime_error(Form(
"%s:%d Failed to convert station name %s to an valid offline identifier", __FILE__, __LINE__,
◆ m_amplification
double CSC_Digitizer::m_amplification {0.} |
|
private |
◆ m_bunchTime
double CSC_Digitizer::m_bunchTime {0.} |
|
private |
◆ m_cscHitHelper
◆ m_cscIdHelper
◆ m_debug
int CSC_Digitizer::m_debug {0} |
|
private |
◆ m_driftVelocity
double CSC_Digitizer::m_driftVelocity {60.} |
|
private |
◆ m_electronEnergy
double CSC_Digitizer::m_electronEnergy {66.} |
|
private |
◆ m_muonMgr
◆ m_NInterFromEnergyLoss
bool CSC_Digitizer::m_NInterFromEnergyLoss {true} |
|
private |
◆ m_pcalib
◆ m_Polia
double CSC_Digitizer::m_Polia {0.} |
|
private |
◆ m_sprob
◆ m_stationDict
std::map<char, int> CSC_Digitizer::m_stationDict {} |
|
private |
◆ m_timeWindowLowerOffset
double CSC_Digitizer::m_timeWindowLowerOffset {0.} |
|
private |
◆ m_timeWindowUpperOffset
double CSC_Digitizer::m_timeWindowUpperOffset {0.} |
|
private |
◆ s_maxElectron
constexpr int CSC_Digitizer::s_maxElectron {21} |
|
staticconstexprprivate |
The documentation for this class was generated from the following files:
int stationNameIndex(const std::string &name) const
double anodeCathodeDistance() const
Scalar phi() const
phi method
double m_timeWindowLowerOffset
const CscIdHelper * m_cscIdHelper
Scalar eta() const
pseudorapidity method
double lengthUpToMaxWidth() const
std::vector< ALFA_RawDataCollection_p1 > t1
std::map< char, int > m_stationDict
Cache the csc id dictionary.
int GetChamberLayer(const int &hid) const
int GetPhiSector(const int &hid) const
bool isSmall(const Identifier &id) const
const CscHitIdHelper * m_cscHitHelper
double shortWidth() const
int wireLayer(const Identifier &id) const
std::array< double, s_maxElectron > m_sprob
int GetWireLayer(const int &hid) const
double m_timeWindowUpperOffset
double roxacellWidth() const
virtual int get_channel_hash(const Identifier &id, IdentifierHash &hash_id) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
std::string GetStationName(const int &hid) const
static double fparamPhi(const double x, const std::array< double, 9 > &p)
int GetZSector(const int &hid) const
std::vector< ALFA_RawDataContainer_p1 > t2
const MuonGM::MuonDetectorManager * m_muonMgr
def time(flags, cells_name, *args, **kw)
bool m_NInterFromEnergyLoss
const CscIdHelper * cscIdHelper() const
static constexpr int s_maxElectron
constexpr int pow(int base, int exp) noexcept
int chamberLayer(const Identifier &id) const