16 #include "Riostream.h"
61 std::cout <<
"**** Geometrical shaped condition with parameters:" << std::endl;
65 std::cout <<
"**** Tilt: "<<
fdTheta<<
" deg" << std::endl;
66 std::cout <<
"**** Resolution: "<<
fiResolution<<
" points" << std::endl;
74 if(cond->InheritsFrom(TGo4ShapedCond::Class()))
91 std::cout <<
"Cannot update " << GetName() <<
" from " << cond->ClassName() << std::endl;
105 message.Form(
"TGo4ShapedCond::UpdateFromUrl - condition %s: with url:%s\n", GetName(), rest_url_opt);
106 Double_t x=0,y=0,
a=0,b=0;
121 message.Append(TString::Format(
"Set to Circle shape with x:%f, y:%f, r:%f, points=%d", x,y,
a,resolution));
127 message.Append(TString::Format(
"Set to Ellipse shape with x:%f, y:%f, a:%f b:%f,theta:%f, points=%d",
128 x, y,
a, b, theta, resolution));
133 message.Append(TString::Format(
"Set to Box shape with x:%f, y:%f, a:%f b:%f,theta:%f",
139 message.Append(TString::Format(
"Set to Free polygon shape!"));
233 Double_t dphi = TMath::TwoPi()/n;
234 Double_t ct = TMath::Cos(TMath::Pi()*
fdTheta/180);
235 Double_t st = TMath::Sin(TMath::Pi()*
fdTheta/180);
236 for (Int_t i = 0; i < n; i++)
238 dx =
fdRadius1 * TMath::Cos((Double_t) i * dphi);
239 dy =
fdRadius2 * TMath::Sin((Double_t) i * dphi);
264 Double_t ct = TMath::Cos(TMath::Pi()*
fdTheta/180);
265 Double_t st = TMath::Sin(TMath::Pi()*
fdTheta/180);
274 for(Int_t i=4; i< n+1; ++i)
void SetTheta(Double_t angle)
virtual void PrintCondition(Bool_t points=kTRUE)
void GetRadius(Double_t &a1, Double_t &a2)
void DefineEllipse(Double_t *x, Double_t *y, Int_t n)
static TString fgxURL_SHAPE
const char * GetShapeName()
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts)
void DefineBox(Double_t *x, Double_t *y, Int_t n)
void SetRadius(Double_t a1, Double_t a2)
void SetCenter(Double_t x, Double_t y)
virtual Bool_t UpdateFromUrl(const char *rest_url_opt)
virtual Bool_t UpdateFromUrl(const char *rest_url_opt)
virtual Bool_t UpdateFromUrl(const char *rest_url_opt)
static const char * Message(Int_t prio, const char *text,...)
virtual void PrintCondition(Bool_t points=kTRUE)
void GetCenter(Double_t &x, Double_t &y)
static TString fgxURL_RESOLUTION
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts)
Go4CondShape_t fiShapeType
virtual ~TGo4ShapedCond()
Int_t GetUrlOptionAsInt(const char *key, Int_t def_value)
#define GO4ELLIPSECOND_DEFAULTRESOLUTION
Double_t GetUrlOptionAsDouble(const char *key, Double_t def_value)