61 h3->SetMarkerColor(2);
62 h3->SetMarkerStyle(22);
68 h4->SetMarkerColor(5);
69 h4->SetMarkerStyle(23);
75 h5->SetMarkerColor(6);
76 h5->SetMarkerStyle(29);
82 h6->SetMarkerColor(7);
83 h6->SetMarkerStyle(3);
117 if (h3 != 0) tleg->
AddEntry(h3,
"SMatrix_sym",
"p");
118 if (h4 != 0) tleg->
AddEntry(h4,
"TMatrix_sym",
"p");
119 if (h5 != 0) tleg->
AddEntry(h5,
"HepMatrix",
"p");
120 if (h6 != 0) tleg->
AddEntry(h6,
"HepMatrix_sym",
"p");
142 std::string fileName;
144 fileName=
"testOperations_" +
systemName +
".root";
146 fileName=
"testOperations.root";
151 std::cout <<
"Profile " << s <<
" not found !!! " << std::endl;
154 for (
int i = 0; i <
N; ++i) {
155 y[i] = h1->GetBinContent(
int(x[i] + 0.1) );
156 ey[i] = h1->GetBinError(
int(x[i] + 0.1) );
166 std::string cName =
"c1_" +
type;
167 std::string cTitle =
"Matrix operations " +
type;
177 double x[
N] = { 2.,3.,4.,5.,6,7.,10,15,20,30};
195 GetData(
"SMatrix_dot",x,smat,es);
196 GetData(
"TMatrix_dot",x,tmat,et);
197 if (clhep)
GetData(
"HepMatrix_dot",x,cmat,ec);
204 DrawData(
"#vec{v} #upoint #vec{w}",g10,g20,g30,g40,g50);
207 GetData(
"SMatrix_M*V+",x,smat,es);
208 GetData(
"TMatrix_M*V+",x,tmat,et);
209 GetData(
"SMatrix_sym_M*V+",x,ymat,ey);
210 GetData(
"TMatrix_sym_M*V+",x,wmat,ew);
211 if (clhep)
GetData(
"HepMatrix_M*V+",x,cmat,ec);
212 if (clhep)
GetData(
"HepMatrix_sym_M*V+",x,zmat,ez);
221 DrawData(
"M #upoint #vec{v} + #vec{w}",g11,g21,g31,g41,g51,g61);
224 GetData(
"SMatrix_prod",x,smat,es);
225 GetData(
"TMatrix_prod",x,tmat,et);
226 GetData(
"SMatrix_sym_prod",x,ymat,ey);
227 GetData(
"TMatrix_sym_prod",x,wmat,ew);
229 GetData(
"HepMatrix_M*V+",x,cmat,ec);
230 GetData(
"HepMatrix_sym_M*V+",x,zmat,ez);
240 DrawData(
"v^{T} * M * v",g12,g22,g32,g42,g52,g62);
244 GetData(
"SMatrix_M*M",x,smat,es);
245 GetData(
"TMatrix_M*M",x,tmat,et);
246 GetData(
"SMatrix_sym_M*M",x,ymat,ey);
247 GetData(
"TMatrix_sym_M*M",x,wmat,ew);
249 GetData(
"HepMatrix_M*M",x,cmat,ec);
250 GetData(
"HepMatrix_sym_M*M",x,zmat,ez);
260 DrawData(
"A * B + C",g14,g24,g34,g44,g54,g64);
263 GetData(
"SMatrix_At*M*A",x,smat,es);
264 GetData(
"TMatrix_At*M*A",x,tmat,et);
265 GetData(
"SMatrix_sym_At*M*A",x,ymat,ey);
266 GetData(
"TMatrix_sym_At*M*A",x,wmat,ew);
268 GetData(
"HepMatrix_At*M*A",x,cmat,ec);
269 GetData(
"HepMatrix_sym_At*M*A",x,zmat,ez);
279 DrawData(
"A * M * A^{T}",g15,g25,g35,g45,g55,g65);
282 GetData(
"SMatrix_inv",x,smat,es);
283 GetData(
"TMatrix_inv",x,tmat,et);
284 GetData(
"SMatrix_sym_inv",x,ymat,ey);
285 GetData(
"TMatrix_sym_inv",x,wmat,ew);
287 GetData(
"HepMatrix_inv",x,cmat,ec);
288 GetData(
"HepMatrix_sym_inv",x,zmat,ez);
298 DrawData(
"A^{-1}",g16,g26,g36,g46,g56,g66);
308 if (drawSingleGraph) {
309 std::string c2Name =
"c2_" +
type;
310 TCanvas *
c2 =
new TCanvas(c2Name.c_str(),
"Matrix Operations",200,10,700,600);
311 DrawData(
"A * M * A^{T}",g15,g25,g35,g45,g55,g65);
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
virtual void SetLineWidth(Width_t lwidth)
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
This class displays a legend box (TPaveText) containing several legend entries.
virtual void SetLimits(Double_t xmin, Double_t xmax)
R__EXTERN TStyle * gStyle
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
A TMultiGraph is a collection of TGraph (or derived) objects.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void SetTitle(const char *title="")
Set graph title.
TFrame * GetFrame()
Get frame.
virtual void SetMarkerColor(Color_t mcolor=1)
virtual void Draw(Option_t *chopt="")
Draw this multigraph with its current attributes.
TAxis * GetXaxis() const
Get x axis of the graph.
virtual void SetBorderSize(Short_t bordersize)
virtual void SetLineColor(Color_t lcolor)
TAxis * GetXaxis() const
Get x axis of the graph.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual void SetFillColor(Color_t fcolor)
virtual void SetMarkerStyle(Style_t mstyle=1)
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
void SetNoExponent(Bool_t noExponent=kTRUE)
Set the NoExponent flag By default, an exponent of the form 10^N is used when the label value are eit...
A Pave (see TPave) with text, lines or/and boxes inside.
void DrawData(char *title, TGraphErrors *h1, TGraphErrors *h2, TGraphErrors *h3=0, TGraphErrors *h4=0, TGraphErrors *h5=0, TGraphErrors *h6=0)
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
void matrixOperations_do(std::string type="", bool clhep=false, bool drawSingleGraph=false)
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
TAxis * GetYaxis() const
Get y axis of the graph.
void matrixOperations(std::string type="", bool clhep=false, bool drawSingleGraph=false)
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
void SetMoreLogLabels(Bool_t more=kTRUE)
Set the kMoreLogLabels bit flag When this option is selected more labels are drawn when in log scale ...
A TGraphErrors is a TGraph with error bars.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
virtual void Add(TGraph *graph, Option_t *chopt="")
Add a new graph to the list of graphs.
virtual void Update()
Update canvas pad buffers.
void GetData(std::string s, double *x, double *y, double *ey)
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
TAxis * GetYaxis() const
Get y axis of the graph.
void Modified(Bool_t flag=1)
virtual void SetBorderSize(Int_t bordersize=4)