Skip to content
Snippets Groups Projects
Commit d87b3f79 authored by Bertram Kopf's avatar Bertram Kopf
Browse files

improved performance for omega decay to 3 pions in tensor formalism

parent 83664575
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
class AbsDecay; class AbsDecay;
//class AbsDynamics; //class AbsDynamics;
//typedef CacheVector<std::map<std::string,std::map<Id2StringType, complex<float> > > > intStringShortComplFloatMap;
typedef CacheVector<std::map<unsigned short, std::map<Id2StringType, complex<float> > > > intUShortId2StringComplFloatMap; typedef CacheVector<std::map<unsigned short, std::map<Id2StringType, complex<float> > > > intUShortId2StringComplFloatMap;
class AbsXdecAmp : public AbsParamHandler{ class AbsXdecAmp : public AbsParamHandler{
......
...@@ -73,7 +73,7 @@ complex<double> TensorOmegaTo3PiDecAmps::XdecAmp(Spin& lamX, EvtData* theData, S ...@@ -73,7 +73,7 @@ complex<double> TensorOmegaTo3PiDecAmps::XdecAmp(Spin& lamX, EvtData* theData, S
Id1StringType currentSpinIndex=FunctionUtils::spin1Index(lamX); Id1StringType currentSpinIndex=FunctionUtils::spin1Index(lamX);
if ( _cacheAmps && !_recalculate){ if ( _cacheAmps && !_recalculate){
result=_cachedLocalAmpMap.at(evtNo).at(_absDyn->grandMaKey(grandmaAmp)).at(currentSpinIndex); result=_cachedLocalAmpIdMap.at(evtNo).at(_absDyn->grandMaId(grandmaAmp)).at(currentSpinIndex);
return result; return result;
} }
...@@ -88,7 +88,7 @@ complex<double> TensorOmegaTo3PiDecAmps::XdecAmp(Spin& lamX, EvtData* theData, S ...@@ -88,7 +88,7 @@ complex<double> TensorOmegaTo3PiDecAmps::XdecAmp(Spin& lamX, EvtData* theData, S
result*=100.; result*=100.;
if ( _cacheAmps){ if ( _cacheAmps){
theMutex.lock(); theMutex.lock();
_cachedLocalAmpMap[evtNo][_absDyn->grandMaKey(grandmaAmp)][currentSpinIndex]=result; _cachedLocalAmpIdMap[evtNo][_absDyn->grandMaId(grandmaAmp)][currentSpinIndex]=result;
theMutex.unlock(); theMutex.unlock();
} }
......
...@@ -41,7 +41,7 @@ class OmegaTo3PiTensorDecay; ...@@ -41,7 +41,7 @@ class OmegaTo3PiTensorDecay;
class Particle; class Particle;
class AbsPawianParameters; class AbsPawianParameters;
typedef CacheVector<std::map<std::string,std::map<Id1StringType, complex<float> > > > tensorOmegaTo3PiCachedMap; typedef CacheVector<std::map<unsigned short,std::map<Id1StringType, complex<float> > > > tensorOmegaTo3PiCachedIdMap;
class TensorOmegaTo3PiDecAmps : public AbsXdecAmp{ class TensorOmegaTo3PiDecAmps : public AbsXdecAmp{
...@@ -79,7 +79,7 @@ protected: ...@@ -79,7 +79,7 @@ protected:
Particle* _daughter1; Particle* _daughter1;
Particle* _daughter2; Particle* _daughter2;
Particle* _daughter3; Particle* _daughter3;
tensorOmegaTo3PiCachedMap _cachedLocalAmpMap; tensorOmegaTo3PiCachedIdMap _cachedLocalAmpIdMap;
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment