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

new classes imported

parent b2ada322
No related branches found
No related tags found
No related merge requests found
#include <getopt.h>
#include <fstream>
#include <string>
#include "Examples/pbarpToOmegaPi/OmegaPiLh.hh"
#include "Examples/pbarpToOmegaPi/OmegaPiEventList.hh"
#include "PwaUtils/pbarpStates.hh"
#include "Examples/pbarpToOmegaPi/pbarpToOmegaPi0States.hh"
OmegaPiLh::OmegaPiLh(boost::shared_ptr<const OmegaPiEventList> theEvtList, int jmax) :
_omegaPiEventListPtr(theEvtList),
_jmax(jmax)
{
init();
}
OmegaPiLh::OmegaPiLh(boost::shared_ptr<OmegaPiLh> theOmegaPiLhPtr):
_omegaPiEventListPtr(theOmegaPiLhPtr->getEventList()),
_jmax(theOmegaPiLhPtr->jmax())
{
init();
}
OmegaPiLh::~OmegaPiLh()
{
}
void OmegaPiLh::init(){
boost::shared_ptr<pbarpStates> thepbarpStatesPtr(new pbarpStates(_jmax));
boost::shared_ptr<pbarpToOmegaPi0States> theOmegaPi0StatesPtr(new pbarpToOmegaPi0States(thepbarpStatesPtr));
_JPCLSomegaProd=theOmegaPi0StatesPtr->jpclsStates();
_pbarpJPC=theOmegaPi0StatesPtr->jpcStates();
_pbarpSinglett=thepbarpStatesPtr->extractSingletStates(_pbarpJPC);
}
void OmegaPiLh::print(std::ostream& os) const{
os << "OmegaPiLh::print\n"
<< "The contributed JPC initial states are:" << std::endl;
std::vector< boost::shared_ptr<const jpcRes > >::const_iterator itJPC;
for ( itJPC=_pbarpJPC.begin(); itJPC!=_pbarpJPC.end(); ++itJPC){
(*itJPC)->print(os);
os << std::endl;
}
os << "The initial JPC singlett states are:" << std::endl;
for ( itJPC=_pbarpSinglett.begin(); itJPC!=_pbarpSinglett.end(); ++itJPC){
(*itJPC)->print(os);
os << std::endl;
}
os << "The contributed JPC LS combinations for the omega production are:" << std::endl;
std::vector< boost::shared_ptr<const JPCLS > >::const_iterator itJPCLS;
for ( itJPCLS=_JPCLSomegaProd.begin(); itJPCLS!=_JPCLSomegaProd.end(); ++itJPCLS){
(*itJPCLS)->print(os);
os << std::endl;
}
}
#ifndef _OmegaPiLh_H
#define _OmegaPiLh_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cassert>
#include <boost/shared_ptr.hpp>
#include "TROOT.h"
// #include <TSystem.h>
#include "qft++/topincludes/relativistic-quantum-mechanics.hh"
#include "Examples/pbarpToOmegaPi/OmegaPiData.hh"
#include "PwaUtils/DataUtils.hh"
// using namespace std;
class OmegaPiEventList;
class OmegaPiLh {
public:
// create/copy/destroy:
///Constructor
OmegaPiLh(boost::shared_ptr<const OmegaPiEventList>, int);
OmegaPiLh(boost::shared_ptr<OmegaPiLh>);
/** Destructor */
virtual ~OmegaPiLh();
OmegaPiLh* clone_() const {
return new OmegaPiLh(*this);
}
// Getters:
// double calcLogLh(const OmegaPiData::fitParamVal& theParamVal);
// double calcEvtIntensity(const OmegaPiData::OmPiEvtData& theEvtData, const fitParamVal& theParamVal);
// bool setFitParamVal(OmegaPiData::fitParamVal& fitParamVal, const std::vector<double>& par);
boost::shared_ptr<const OmegaPiEventList> getEventList() const {return _omegaPiEventListPtr;}
std::vector< boost::shared_ptr<const JPCLS> > omegaProdStates() const {return _JPCLSomegaProd;}
int jmax() const {return _jmax;}
void print(std::ostream& os) const;
protected:
private:
boost::shared_ptr<const OmegaPiEventList> _omegaPiEventListPtr;
int _jmax;
std::vector< boost::shared_ptr<const jpcRes> > _pbarpJPC;
std::vector< boost::shared_ptr<const JPCLS> > _JPCLSomegaProd;
std::vector< boost::shared_ptr<const jpcRes> > _pbarpSinglett;
void init();
};
#endif
#include <algorithm>
#include <boost/shared_ptr.hpp>
namespace pawian {
namespace Collection {
struct PtrLess {
template<class PtrType>
bool operator()(PtrType ptr1, PtrType ptr2) const {
return (*ptr1) < (*ptr2);
}
};
struct SharedPtrLess {
template<class PtrType>
bool operator()(boost::shared_ptr<PtrType> shptr1, boost::shared_ptr<PtrType> shptr2) const {
PtrType* ptr1=shptr1.get();
PtrType* ptr2=shptr2.get();
return (*ptr1) < (*ptr2);
}
};
}
}
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