|
ATLAS Offline Software
|
#include <ParabolaCscClusterFitter.h>
|
| ParabolaCscClusterFitter (const std::string &type, const std::string &aname, const IInterface *parent) |
| Constructor. More...
|
|
| ~ParabolaCscClusterFitter ()=default |
|
StatusCode | initialize () |
|
const DataNames & | dataNames () const |
| data names for ntuple output in csc_cluster tree More...
|
|
Results | fit (const StripFitList &sfits) const |
|
Results | fit (const StripFitList &sfits, double dposdz) const |
| Main fit method. More...
|
|
double | getCorrectedError (const Muon::CscPrepData *pclu, double slope) const |
| Correct the positon error for track angle. More...
|
|
virtual Results | fit (const StripFitList &sfits) const=0 |
|
virtual Results | fit (const StripFitList &sfits, double dposdz) const=0 |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 28 of file ParabolaCscClusterFitter.h.
◆ ChargeList
◆ DataMap
◆ DataNames
◆ Results
◆ StoreGateSvc_t
◆ StripFit
◆ StripFitList
◆ StripList
◆ ParabolaCscClusterFitter()
ParabolaCscClusterFitter::ParabolaCscClusterFitter |
( |
const std::string & |
type, |
|
|
const std::string & |
aname, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~ParabolaCscClusterFitter()
ParabolaCscClusterFitter::~ParabolaCscClusterFitter |
( |
| ) |
|
|
default |
◆ dataNames()
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fit() [1/4]
Implements ICscClusterFitter.
Definition at line 398 of file ParabolaCscClusterFitter.cxx.
401 for (
unsigned int iresult = 0; iresult <
results.size(); ++iresult) {
404 new_results.push_back(
res);
410 int station =
m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49;
413 double pos =
res.position;
421 double dpos =
res.dposition;
422 res.dposition = std::sqrt(dpos * dpos + dpostht * dpostht);
425 new_results.push_back(
res);
◆ fit() [2/4]
virtual Results ICscClusterFitter::fit |
◆ fit() [3/4]
Main fit method.
The fit is really an interpolation, which uses a parabola through the 3 points given by (-1, qA), (0, qB), and (1, qC). This raw estimate is corrected to account for non-linearites and provides a position in the range of -0.5, 0.5. Finally, the pitch is used to convert the position in mm relative to the center of the chamber.
- Parameters
-
sfits | The list of amplitudes in the StripFitList. |
tantheta | The theta angle of the track, used for error estimate. @Note How do you get the track angle before this hit reconstruction? |
- Returns
- The Results vector, usually containing only one result, that of the largest hit.
- Todo:
- Remove this useless test.
- Todo:
- check segment finding efficiency with Y pos = strip number.
- Todo:
- Base errors on error propagation in parabola.
- Todo:
- Check errors against residuals.
- Todo:
- Check for saturation and increase errors.
- Todo:
- Check for large amps and increase errors.
- Todo:
- Check for small amps and increase errors.
- Todo:
- Check cluster profile for overlapping hits.
Implements ICscClusterFitter.
Definition at line 155 of file ParabolaCscClusterFitter.cxx.
161 unsigned int nstrip = sfits.size();
163 ATH_MSG_VERBOSE(
" CscStatusNarrow: Input has fewer than three strips.");
169 for (
unsigned int istrip = 0; istrip < nstrip; istrip++) {
170 if (sfits[istrip].
strip ==
nullptr) {
184 if (MuonDetMgr ==
nullptr) {
185 ATH_MSG_ERROR(
"Null pointer to the MuonDetectorManager conditions object");
191 bool measphi =
m_idHelperSvc->cscIdHelper().CscIdHelper::measuresPhi(idStrip0);
194 unsigned int strip0 =
m_idHelperSvc->cscIdHelper().strip(idStrip0) - 1;
195 int station =
m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49;
196 CscPlane plane = findPlane(station, measphi);
198 ATH_MSG_WARNING(
"Invalid CSC plane: station=" << station <<
"; measphi=" << measphi);
206 for (
unsigned int istrip = 0; istrip < nstrip; ++istrip) {
207 Identifier id = sfits[istrip].strip->identify();
210 <<
" amp:" << (
int)(sfits[istrip].charge / 1000) <<
" ke.");
215 unsigned int istrip_peak = 0;
219 double charge_clu = sfits[0].charge + sfits[nstrip - 1].charge;
220 for (
unsigned int istrip = 1; istrip < nstrip - 1; ++istrip) {
221 float qthis = sfits[istrip].charge;
222 float qlast = sfits[istrip - 1].charge;
223 float qnext = sfits[istrip + 1].charge;
224 double thr =
m_multi * sfits[istrip].dcharge / 10;
225 Identifier id = sfits[istrip].strip->identify();
227 <<
" amp:" << (
int)(sfits[istrip].charge / 1000) <<
" ke, thr: " << (
int)(thr / 1000) <<
" ke "
228 << ((qthis > thr) ?
"signal" :
"noise") << sfits[istrip].dcharge / 1000);
232 if ((qthis >= qlast) && (qthis >= qnext)) {
234 istrip_peak = istrip;
237 if (qthis > thr) numPeaks++;
241 ATH_MSG_VERBOSE(
" Peak is at index " << istrip_peak <<
" amp = " << qpeak / 1000);
244 ATH_MSG_VERBOSE(
" CscStatusMultiPeak: multiple peaks are found: " << numPeaks);
248 if (istrip_peak == 0) {
257 if (strip0 + istrip_peak <= 0 || strip0 + istrip_peak >= maxstrip - 1) {
259 ATH_MSG_VERBOSE(
" CscStatusEdge: strip0+istrip_peak = " << strip0 + istrip_peak);
290 double qA = sfits[istrip_peak - 1].charge;
291 double qB = sfits[istrip_peak].charge;
292 double qC = sfits[istrip_peak + 1].charge;
295 double dqA = sfits[istrip_peak - 1].dcharge;
296 double dqB = sfits[istrip_peak].dcharge;
297 double dqC = sfits[istrip_peak + 1].dcharge;
311 double cog = 1.2 * (qC - qA) / (qA + qB + qC);
315 double dpos = (dqA + dqB + dqC) / 3 / (qA + qB + qC) * pitch * std::sqrt(2.0);
317 if (measphi) dpos = 2.5;
327 savg =
pos + strip0 + istrip_peak;
329 ATH_MSG_VERBOSE(
" Parabola correction: plane = '" << splane(plane) <<
"' qA=" << qA <<
" qB=" << qB <<
" qC=" << qC <<
" raw=" << raw
330 <<
" pos=" <<
pos <<
", cog=" << cog);
342 res.position = pitch * (savg + 0.5 - 0.5 * maxstrip);
343 res.dposition = std::sqrt(dpos * dpos + dpostht * dpostht);
344 res.strip = istrip_peak;
346 res.lstrip = nstrip - 1;
347 res.charge = charge_clu;
348 res.time = sfits[
res.strip].time;
354 ATH_MSG_VERBOSE(
" Position: pos=" <<
res.position <<
" dpos:dtht=" << dpos <<
":" << dpostht <<
" ==>" <<
res.dposition
355 <<
" at tanth = " << tantheta);
◆ fit() [4/4]
virtual Results ICscClusterFitter::fit |
◆ getCorrectedError()
Correct the positon error for track angle.
- Note
- This should be done in the segment, not here.
- Todo:
- Read, understand, and verify correctness. @pclu The CSC Prep Data for the cluster @slope The track angle
- Returns
- The new error estimate.
Implements ICscClusterFitter.
Definition at line 368 of file ParabolaCscClusterFitter.cxx.
376 int station =
m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49;
389 double newError = std::sqrt(dpos * dpos - old_dpostht * old_dpostht + new_dpostht * new_dpostht);
391 ATH_MSG_VERBOSE(
" Position :: pos=" <<
pos <<
" dpos:newdpos=" << dpos <<
" : " << newError <<
" " << old_dpostht <<
" "
◆ initialize()
StatusCode ParabolaCscClusterFitter::initialize |
( |
| ) |
|
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
static const InterfaceID& ICscClusterFitter::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Must declare this, with name of interface
Definition at line 89 of file ICscClusterFitter.h.
90 static const InterfaceID IID_ICscClusterFitter(
"ICscClusterFitter", 1, 0);
91 return IID_ICscClusterFitter;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ ParabolaCorrection()
double ParabolaCscClusterFitter::ParabolaCorrection |
( |
CscPlane & |
plane, |
|
|
double & |
raw |
|
) |
| |
|
static |
Correction of raw parabola positions.
Correct the raw parabola interpolation, based on CSCPlane.
- Parameters
-
plane | The csc plane enum for small or large chamber, X or Y plane |
raw | The raw value of the parabola peak positon |
- Returns
- The corrected value
The correction function takes the output of the parabola method, the peak position, and returns a position that is closer to the predicted position. The correction depends on the strip pitch and was found experimentally during various beam tests and cosmics tests.
- Parameters
-
plane | The plane of the detector: Large or Small, X or Y. |
raw | The uncorrected value |
- Returns
- The corrected value, often in range from -0.5 to 0.5.
Definition at line 65 of file ParabolaCscClusterFitter.cxx.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
retrieve MuonDetectorManager from the conditions store
Definition at line 77 of file ParabolaCscClusterFitter.h.
◆ m_detStore
◆ m_error_tantheta
double ParabolaCscClusterFitter::m_error_tantheta |
|
private |
◆ m_evtStore
◆ m_idHelperSvc
◆ m_max_width
std::vector<unsigned int> ParabolaCscClusterFitter::m_max_width |
|
private |
◆ m_multi
double ParabolaCscClusterFitter::m_multi |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_xtan_csl_eta_offset
double ParabolaCscClusterFitter::m_xtan_csl_eta_offset |
|
private |
◆ m_xtan_csl_eta_slope
double ParabolaCscClusterFitter::m_xtan_csl_eta_slope |
|
private |
◆ m_xtan_css_eta_offset
double ParabolaCscClusterFitter::m_xtan_css_eta_offset |
|
private |
◆ m_xtan_css_eta_slope
double ParabolaCscClusterFitter::m_xtan_css_eta_slope |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
ICscClusterFitter::DataNames DataNames
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
double m_xtan_csl_eta_offset
constant to Calculate the angle of incidence.
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
double m_xtan_csl_eta_slope
constant to Calculate the angle of incidence.
int maxNumberOfStrips(int measuresPhi) const
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
double m_xtan_css_eta_offset
constant to Calculate the angle of incidence.
std::pair< std::vector< unsigned int >, bool > res
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::vector< unsigned int > m_max_width
Max.
std::map< std::string, double > DataMap
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Identifier identify() const
return the identifier
@ CscStatusNarrow
Too narrow.
@ CscStatusUnspoiled
Clean cluster with precision fit.
static double ParabolaCorrection(CscPlane &plane, double &raw)
Correction of raw parabola positions.
Results fit(const StripFitList &sfits) const
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const Amg::Vector2D & localPosition() const
return the local position reference
StatusCode initialize(bool used=true)
std::vector< Result > Results
@ CscStatusMultiPeak
More than one peak in cluster.
double m_multi
threshold multiplier for cluster peak finding
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double m_xtan_css_eta_slope
constant to Calculate the angle of incidence.
double m_error_tantheta
error contribution in mm for the tan(theta) track angle correction
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ CscStatusEdge
Cluster reaches the edge of plane.
double cathodeReadoutPitch(int chLayer, int measuresPhi) const