diff --git a/PwaUtils/RootPiPiScatteringHist.cc b/PwaUtils/RootPiPiScatteringHist.cc index f5f0dfa8b5e2ba3e161474c18efe5ff3cd138c1b..6ad2b25978cf802753a663085f4bc27429b16fef 100644 --- a/PwaUtils/RootPiPiScatteringHist.cc +++ b/PwaUtils/RootPiPiScatteringHist.cc @@ -72,8 +72,14 @@ RootPiPiScatteringHist::RootPiPiScatteringHist(std::string additionalSuffix, boo if (GlobalEnv::instance()->parser()->productionFormalism()=="Phase"){ graphNameData="PhaseData"; graphNameFit="PhaseFit"; - graphTitleData="#eta (data)"; - graphTitleFit="#eta (fit)"; + graphTitleData="#delta (data)"; + graphTitleFit="#delta (fit)"; + } + else if (GlobalEnv::instance()->parser()->productionFormalism()=="PhasePhi"){ + graphNameData="PhaseData"; + graphNameFit="PhaseFit"; + graphTitleData="#Phi (data)"; + graphTitleFit="#Phi (fit)"; } else if (GlobalEnv::instance()->parser()->productionFormalism()=="Elasticity"){ graphNameData="ElasticityData"; @@ -99,6 +105,12 @@ RootPiPiScatteringHist::RootPiPiScatteringHist(std::string additionalSuffix, boo graphTitleData="T_{ij} imag (data)"; graphTitleFit="T_{ij} imag (fit)"; } + else if (GlobalEnv::instance()->parser()->productionFormalism()=="Tabs"){ + graphNameData="TabsData"; + graphNameFit="TabsFit"; + graphTitleData="|T| (data)"; + graphTitleFit="|T| (fit)"; + } else if (GlobalEnv::instance()->parser()->productionFormalism()=="PhaseDiff"){ graphNameData="PhaseDiffData"; graphNameFit="PhaseDiffFit"; diff --git a/PwaUtils/TMatrixDynamics.cc b/PwaUtils/TMatrixDynamics.cc index 5181a601db3e58f6b84e3f605ff9169b91a5b500..6cfc550d97dfb5dfbf8da25045a89f8571ed193d 100644 --- a/PwaUtils/TMatrixDynamics.cc +++ b/PwaUtils/TMatrixDynamics.cc @@ -79,6 +79,8 @@ TMatrixDynamics::TMatrixDynamics(std::string& name, std::vector<Particle*>& fsPa else if(dataType=="Treal") _dataTypeID=7; else if(dataType=="Timag") _dataTypeID=8; else if(dataType=="Tcheck") _dataTypeID=9; + else if(dataType=="Tabs") _dataTypeID=10; + else if(dataType=="PhasePhi") _dataTypeID=11; else { Alert << "production formalism/data type with the name" << dataType << " is not supported for pi pi scattering fits! \n It is working for: " @@ -123,6 +125,12 @@ complex<double> TMatrixDynamics::eval(EvtData* theData, AbsXdecAmp* grandmaAmp, else if(_dataTypeID==8){ evalTimag(theData, currentMass, OrbMom); } + else if(_dataTypeID==10){ + evalTabs(theData, currentMass, OrbMom); + } + else if(_dataTypeID==11){ + evalPhasePhi(theData, currentMass, OrbMom); + } else{ Alert << "_dataTypeID = " <<_dataTypeID << " is not supported!!!" << endmsg; exit(1); @@ -528,6 +536,27 @@ void TMatrixDynamics::evalTimag(EvtData* theData, double currentMass, Spin OrbMo theData->DoubleId.at(IdStringMapRegistry::instance()->stringId(EvtDataScatteringList::FIT_PIPISCAT_NAME))=currentTijRel.imag(); } +void TMatrixDynamics::evalTabs(EvtData* theData, double currentMass, Spin OrbMom){ + complex<double> currentTijRel=(*_tMatr)(_prodProjectionIndex,_decProjectionIndex); + theData->DoubleId.at(IdStringMapRegistry::instance()->stringId(EvtDataScatteringList::FIT_PIPISCAT_NAME))=std::abs(currentTijRel); +} + +void TMatrixDynamics::evalPhasePhi(EvtData* theData, double currentMass, Spin OrbMom=0){ + complex<double> currentTijRel=(*_tMatr)(_prodProjectionIndex,_decProjectionIndex); + double phasePhi = std::arg(currentTijRel)*PawianConstants::radToDeg; + while(phasePhi>180.) phasePhi-=360.; + while(phasePhi<-180.) phasePhi+=360.; + //if (phasePhi<0.) phasePhi+=180.; + + double phasePhiData=theData->DoubleId.at(IdStringMapRegistry::instance()->stringId(EvtDataScatteringList::DATA_PIPISCAT_NAME)); + + while( (phasePhiData-phasePhi) > 180.) phasePhi+=360.; + while( (phasePhi-phasePhiData) > 180.) phasePhi-=360.; + + theData->DoubleId.at(IdStringMapRegistry::instance()->stringId(EvtDataScatteringList::FIT_PIPISCAT_NAME))=phasePhi; + +} + unsigned int TMatrixDynamics::noOfRotations(double currentMass){ unsigned int noOfLoops=0; std::map<unsigned int, double >::iterator it; @@ -564,7 +593,11 @@ void TMatrixDynamics::fillMasses(EvtData* theData){ void TMatrixDynamics::setProdProjectionIndex(int idx){ if(idx>=0) _prodProjectionIndex=idx; - if( _prodProjectionIndex > (int) _phpVecs.size()){ + // else{ + // ErrMsg << "projection index for the production = " << idx << " is negative!!! The index must be between 0 and (number of channels - 1)" << endmsg; + // exit(1); + // } + if( _prodProjectionIndex > (int) _phpVecs.size()-1){ ErrMsg << "projection index for the production = " << _prodProjectionIndex << " is too large!!!" << "\nmust be less than number of channels: " << _phpVecs.size() << endmsg; exit(1); diff --git a/PwaUtils/TMatrixDynamics.hh b/PwaUtils/TMatrixDynamics.hh index c100b03ac4477a4c6df2456abf43861e5eaa7fa9..031a4d90bc55323fcfcc18b1d0f26d29c77fd525 100644 --- a/PwaUtils/TMatrixDynamics.hh +++ b/PwaUtils/TMatrixDynamics.hh @@ -107,6 +107,8 @@ protected: virtual void evalArgandUnits(EvtData* theData, double currentMass, Spin OrbMom); virtual void evalTreal(EvtData* theData, double currentMass, Spin OrbMom); virtual void evalTimag(EvtData* theData, double currentMass, Spin OrbMom); + virtual void evalTabs(EvtData* theData, double currentMass, Spin OrbMom); + virtual void evalPhasePhi(EvtData* theData, double currentMass, Spin OrbMom); unsigned int noOfRotations(double currentMass); private: