ROOT logo
#ifndef _TCTScan 
#define _TCTScan

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TCT Tamperature Scan                                                 //
//                                                                      //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////
#include "stdio.h"
#include "stdlib.h"
#include "MeasureWF.h"
#include "TCTReflect.h"
#include "TH2F.h"
#include "TGraphErrors.h"


class  TCTScan : public TObject {

private:
Int_t Num;
TClonesArray *vf;          //->

Int_t i2a(Char_t *,Float_t,Int_t=1);
 public:
 TPaveText *pt;            //!
 Int_t TypeOfGeneration;   // Type of generation

 TCTScan(Int_t=40);
  TCTScan(Char_t *,Float_t=0);
  ~TCTScan();
  Int_t GetNum() {return(Num);};
  void  SetNum(Int_t);
  void AddMeasureWF(Int_t,Char_t *,Float_t,Int_t=1000);
  void AddMeasureWF(Int_t,MeasureWF*);
  void Merge(TCTScan *);
  void ReadFile(Char_t *,Int_t *step,Int_t count,Float_t shift, Int_t=1000);
  //  TH1F *GetHisto(Int_t i,Float_t volt) { return(Get(i)->) };
  void NormArray(Int_t,Float_t *);
  void Info(Int_t=-1111, Int_t=-1111);
  TGraph *DrawIT(Float_t,Int_t=0);
  void DrawMulti(Float_t,Float_t=-1111.,Float_t=-1111.,Int_t=-1,Int_t=-1,Int_t =1,Int_t=1);
  void DrawMultiCCE(Float_t,Float_t, Int_t=-1 , Int_t=-1, Int_t=0 );
  void DrawMultiCS(Float_t,Float_t=-1111.,Float_t=-1111.,Int_t=-1,Int_t=-1);
  TGraph *CCE(Float_t,Int_t=0,Float_t=-1111,Float_t =-1111);
  TGraph *CCEE(Elec *,Float_t,Int_t=0);
  TGraphErrors *FDV(Float_t, Float_t,Float_t,Float_t,Float_t, Float_t,Int_t =0 ,Int_t=0,Float_t=-1111,Float_t=1,Float_t=0,Float_t=0);
  TGraph *FDV(Elec *,Float_t,Float_t,Float_t, Float_t,Int_t=0,Int_t =0 );
  void CorrectBaseLine(Int_t method=0) {for(Int_t i=0;i<Num;i++) Get(i)->CorrectBaseLine(method);};
  void Legend(TH1F *, Int_t, Int_t,Int_t=1);
#ifdef RHDB  
  void DBResult(Char_t *user) {for(Int_t i=0;i<Num;i++) Get(i)->DBResult(user);}
#endif
  void SetCapacitance(Double_t x) {for(Int_t i=0;i<Num;i++) Get(i)->CAP=x;};
  inline TH1F *GetHA(Int_t index, Float_t Volt) {return(Get(index)->GetHA(Volt));};
  inline TH1F *operator()(Int_t index, Float_t Volt) {return(GetHA(index,Volt));};
  inline MeasureWF *Get(Int_t index) {return((MeasureWF *)vf->At(index));}
  inline MeasureWF *operator()(Int_t index) {return((MeasureWF *)vf->At(index));};
  
  ClassDef(TCTScan,2) 
};
#endif




#ifndef _PSTCT
#define _PSTCT

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TCT Position Sensitive                                               //
//                                                                      //
// fortmat:                                                             //
// Line 0: Writing type of measurement. 11 = waveform,                  //
// 12 = waveform maximum only, 13 = waveform maximum and integrals      //
// Line 1: Datum                                                        //
// Line 2: Absolute time in s at start                                  //
// Line 2: x0, dx, Nx                                                   //
// Line 3: y0, dy, Ny                                                   //
// Line 4: z0, dz, Nz                                                   //
// Line 5: Nvoltages, Voltages                                          //
// Line 6: t0, dt, Npoints                                              //
// Line a->oo: x y z U tmeas                                            //
// Line b->oo: Npoints meritve                                          //
// Line c->oo: Npoints meritve                                          //
// Line d->oo: Npoints meritve                                          //
// The class TCT scan is used in x                                      //
// The class TCT scan is used in y                                      //
//////////////////////////////////////////////////////////////////////////

class  PSTCT : public TCTReflect {

private:
   void  swoo(char *, char *);
   void  swooip(float *, int);
   int BLE_CODE;
 public:

 FILE *in;
 TArrayI 	 Date;		//Date of the Measurement (or simulation)
 TClonesArray   *histo1;        //-> 
 TClonesArray   *histo2;        //-> 
 TClonesArray   *histo3;        //-> 
 TClonesArray   *histo4;        //->
 // Float_t *xyz[12];             // x coordinates coresponing to histo array change from 8 -> 12 for type 81
 Float_t *xyz[22];                // x coordinates coresponing to histo array change from 8 -> 12 for type 82
 TArrayF ta;                  // ta coordinates coresponing to histo array
 Int_t abstime;
 Int_t Nx,Ny,Nz;
 Int_t RefInd;
 Float_t dx,dy,dz;
 Float_t x0,y0,z0;
 Int_t NU1,NU2;
 TArrayF U1,U2,I1,I2;                    // Array of voltages
 Float_t t0,dt;
 Int_t NP;
 Int_t WFOnOff[4];
 Int_t type;
 Int_t numxyz;
 //Header
 Float_t T;                    // temperature
 Float_t Source;               // type of e-h generation
 Char_t *User;                 // user taking the measurements
 Char_t *Sample;               // Sample name
 Char_t *Comment;              // Comment

 PSTCT(Char_t *, Float_t=0,Int_t=0);   
  ~PSTCT(){};
  void  ReadWFs(Float_t=0);
  void  ReadWFsBin(Float_t=0);
  Int_t indx(Int_t , Int_t , Int_t, Int_t , Int_t );
  Float_t GetWidth(TH1F *, Int_t &, Int_t &,  Float_t=0, Float_t=25, Float_t=-1111, Float_t=-1111, Int_t = 50);
  TH1F *GetHA(Int_t , Int_t);
  TH1F *GetHA(Int_t , Int_t, Int_t, Int_t, Int_t=0, Int_t=0);
  TGraph *GetIV() {TGraph *gr=new TGraph(U1.GetSize(),U1.GetArray(),I1.GetArray()); return gr;}
  TH1F *ModGetHA(Int_t, Int_t, Float_t=-1111, Float_t=-1111);
  TH1F *ModGetHA(Int_t, Int_t, Int_t, Int_t, Int_t=0, Int_t=0, Float_t=-1111, Float_t=-1111);
  TH1F *AverageGetHA(Int_t, Int_t=-1111, Int_t=-1111, Int_t=0, Int_t=0, Int_t=0, Int_t=0, Int_t=0);  
  
  TH2F *Draw(Int_t=0, Int_t=0, Int_t=0, Int_t=0, Int_t=0, Int_t=0, Float_t=0, Float_t=25);
  //TH2F *Draw(Int_t=0, Int_t=0, Int_t=0, Int_t=0, Float_t=0, Float_t=25);
  //TGraph *DrawIV(Int_t t);
  TGraph *DrawArray(Int_t, Int_t);
  void DrawList(Int_t, Int_t *);
  void DrawList(Int_t, Int_t*, Int_t *);
  void PrintInfo();
  void CorrectBaseLine(Float_t=0.0);
  void cords(Int_t);
  inline void cords(Int_t x, Int_t y, Int_t z, Int_t u1, Int_t u2) {int ix=indx(x,y,z,u1,u2); cords(ix);};
  MeasureWF *Projection(int ch, int dir,int x,int y,int z, int nu1, int nu2, int num);
  MeasureWF *Projection(int , int *);
  //  TH2F *Draw(Int_t ch, int plane,int x,int y,int z, int nu1, int nu2, int num););
ClassDef(PSTCT,1) 
};
#endif















 TCTScan.h:1
 TCTScan.h:2
 TCTScan.h:3
 TCTScan.h:4
 TCTScan.h:5
 TCTScan.h:6
 TCTScan.h:7
 TCTScan.h:8
 TCTScan.h:9
 TCTScan.h:10
 TCTScan.h:11
 TCTScan.h:12
 TCTScan.h:13
 TCTScan.h:14
 TCTScan.h:15
 TCTScan.h:16
 TCTScan.h:17
 TCTScan.h:18
 TCTScan.h:19
 TCTScan.h:20
 TCTScan.h:21
 TCTScan.h:22
 TCTScan.h:23
 TCTScan.h:24
 TCTScan.h:25
 TCTScan.h:26
 TCTScan.h:27
 TCTScan.h:28
 TCTScan.h:29
 TCTScan.h:30
 TCTScan.h:31
 TCTScan.h:32
 TCTScan.h:33
 TCTScan.h:34
 TCTScan.h:35
 TCTScan.h:36
 TCTScan.h:37
 TCTScan.h:38
 TCTScan.h:39
 TCTScan.h:40
 TCTScan.h:41
 TCTScan.h:42
 TCTScan.h:43
 TCTScan.h:44
 TCTScan.h:45
 TCTScan.h:46
 TCTScan.h:47
 TCTScan.h:48
 TCTScan.h:49
 TCTScan.h:50
 TCTScan.h:51
 TCTScan.h:52
 TCTScan.h:53
 TCTScan.h:54
 TCTScan.h:55
 TCTScan.h:56
 TCTScan.h:57
 TCTScan.h:58
 TCTScan.h:59
 TCTScan.h:60
 TCTScan.h:61
 TCTScan.h:62
 TCTScan.h:63
 TCTScan.h:64
 TCTScan.h:65
 TCTScan.h:66
 TCTScan.h:67
 TCTScan.h:68
 TCTScan.h:69
 TCTScan.h:70
 TCTScan.h:71
 TCTScan.h:72
 TCTScan.h:73
 TCTScan.h:74
 TCTScan.h:75
 TCTScan.h:76
 TCTScan.h:77
 TCTScan.h:78
 TCTScan.h:79
 TCTScan.h:80
 TCTScan.h:81
 TCTScan.h:82
 TCTScan.h:83
 TCTScan.h:84
 TCTScan.h:85
 TCTScan.h:86
 TCTScan.h:87
 TCTScan.h:88
 TCTScan.h:89
 TCTScan.h:90
 TCTScan.h:91
 TCTScan.h:92
 TCTScan.h:93
 TCTScan.h:94
 TCTScan.h:95
 TCTScan.h:96
 TCTScan.h:97
 TCTScan.h:98
 TCTScan.h:99
 TCTScan.h:100
 TCTScan.h:101
 TCTScan.h:102
 TCTScan.h:103
 TCTScan.h:104
 TCTScan.h:105
 TCTScan.h:106
 TCTScan.h:107
 TCTScan.h:108
 TCTScan.h:109
 TCTScan.h:110
 TCTScan.h:111
 TCTScan.h:112
 TCTScan.h:113
 TCTScan.h:114
 TCTScan.h:115
 TCTScan.h:116
 TCTScan.h:117
 TCTScan.h:118
 TCTScan.h:119
 TCTScan.h:120
 TCTScan.h:121
 TCTScan.h:122
 TCTScan.h:123
 TCTScan.h:124
 TCTScan.h:125
 TCTScan.h:126
 TCTScan.h:127
 TCTScan.h:128
 TCTScan.h:129
 TCTScan.h:130
 TCTScan.h:131
 TCTScan.h:132
 TCTScan.h:133
 TCTScan.h:134
 TCTScan.h:135
 TCTScan.h:136
 TCTScan.h:137
 TCTScan.h:138
 TCTScan.h:139
 TCTScan.h:140
 TCTScan.h:141
 TCTScan.h:142
 TCTScan.h:143
 TCTScan.h:144
 TCTScan.h:145
 TCTScan.h:146
 TCTScan.h:147
 TCTScan.h:148
 TCTScan.h:149
 TCTScan.h:150
 TCTScan.h:151
 TCTScan.h:152
 TCTScan.h:153
 TCTScan.h:154
 TCTScan.h:155
 TCTScan.h:156
 TCTScan.h:157
 TCTScan.h:158
 TCTScan.h:159
 TCTScan.h:160
 TCTScan.h:161
 TCTScan.h:162
 TCTScan.h:163
 TCTScan.h:164
 TCTScan.h:165
 TCTScan.h:166
 TCTScan.h:167
 TCTScan.h:168
 TCTScan.h:169
 TCTScan.h:170
 TCTScan.h:171
 TCTScan.h:172