Skip to content
Snippets Groups Projects
OmegaPiLh.hh 2.24 KiB
Newer Older
#ifndef _OmegaPiLh_H
#define _OmegaPiLh_H

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <complex>

#include <cassert>
#include <boost/shared_ptr.hpp>
#include <boost/archive/text_oarchive.hpp> 
#include <boost/archive/text_iarchive.hpp>
michel's avatar
michel committed
#include <boost/serialization/vector.hpp>

#include "TROOT.h"
// #include <TSystem.h>
#include "qft++/topincludes/relativistic-quantum-mechanics.hh"
#include "Examples/MATpbarpToOmegaPi/OmegaPiData.hh"
michel's avatar
michel committed
#include "Examples/MATpbarpToOmegaPi/OmegaPiEventList.hh"
michel's avatar
michel committed
#include "PwaUtils/DataUtils.hh"

// using namespace std;


class OmegaPiEventList;
class pbarpToOmegaPi0States;

class OmegaPiLh {

  friend class boost::serialization::access;
  
  template<typename Archive>
  void serialize(Archive & ar, const unsigned int) {
    using boost::serialization::make_nvp;


michel's avatar
michel committed
    //ar & make_nvp("omegaPiEventListPtr",_omegaPiEventListPtr);
michel's avatar
michel committed
    //ar & make_nvp("omegaPi0StatesPtr",_omegaPi0StatesPtr);
michel's avatar
michel committed
    //ar & make_nvp("evtDataVec",_evtDataVec);
    //ar & make_nvp("evtMCVec",_evtMCVec);

  }

public:

  // create/copy/destroy:

  ///Constructor 
michel's avatar
michel committed
  OmegaPiLh(boost::shared_ptr<pbarpToOmegaPi0States>);
  OmegaPiLh(boost::shared_ptr<OmegaPiLh>);

  /** Destructor */
  virtual ~OmegaPiLh();

  OmegaPiLh* clone_() const {
michel's avatar
michel committed
    return new OmegaPiLh(_omegaPi0StatesPtr);
        }


  // Getters:
  
  double calcLogLh(const OmegaPiData::fitParamVal& theParamVal);
  double calcEvtIntensity(OmegaPiData::OmPiEvtData* theData, const OmegaPiData::fitParamVal& theParamVal);
michel's avatar
michel committed
  boost::shared_ptr<OmegaPiEventList> getEventList() const {return OmegaPiEventList::getList();}
michel's avatar
michel committed
  boost::shared_ptr<pbarpToOmegaPi0States> omegaPi0States() const {return _omegaPi0StatesPtr;}
  void print(std::ostream& os) const;

protected:


private:

  OmegaPiLh(); //for serialization only

  boost::shared_ptr<const OmegaPiEventList> _omegaPiEventListPtr;
michel's avatar
michel committed
  boost::shared_ptr<pbarpToOmegaPi0States> _omegaPi0StatesPtr;
  std::vector<OmegaPiData::OmPiEvtData*> _evtDataVec;
  std::vector<OmegaPiData::OmPiEvtData*> _evtMCVec;
  complex<double> calcCoherentAmp(Spin lamgamma, Spin Minit, std::map< boost::shared_ptr<const JPCLS>, pair<double, double>, pawian::Collection::SharedPtrLess >& fitParm, OmegaPiData::OmPiEvtData* theData);