ROOT logo
//*-- Author : Dan Magestro (magestro@gsi.de)
//*-- Modified : 24/01/2002
//*-- Modified : 20/01/2004 Jacek Otwinowski
//*-- Modified : 04/01/2005 Jacek Otwinowski
//*-- Modified : 08/02/2005 A.Sadovski
//*-- Modified : 26/11/2007 A.Sadovsky
#ifndef HQAMAKER_H
#define HQAMAKER_H

#include "hreconstructor.h"
#include "hlocation.h"
#include "TRandom.h"
#include "hcategory.h"
#include "TTree.h"
#include "TFile.h"
#include "hqatreemaker.h"
#include "hslowpar.h"

class HQAHistograms;
class HQAVariations;
class HQAScalers;
class HEvent;
//class HCategory;      //asd
class HIterator;
//class HMdcLookupGeom; //asd
//class HMdcLookupRaw;  //asd
class HMdcTimeCut;      //asd
class HQAOutputPS;
class HMdcCutStat;      //asd



class HQAMaker : public HReconstructor {

public:
   HQAMaker(void);
   HQAMaker(const Text_t* name, const Text_t* title);
   ~HQAMaker(void);

   void setSamplingRate(Int_t rate) {
      samplingRate = rate;
   }
   void setIntervalSize(Int_t size) {
      intervalSize = size;
   }
   void setPSFileName(const Char_t *fname) {
      psFile = fname;
   }
   void setOutputDir(const Char_t *fdir) {
      fDir = fdir;
   }

   void setUseSlowPar(Bool_t use) {fUseSlowPar=use;}

   void generatePDF(Bool_t kpdf = kTRUE) {
      kPDF = kpdf;
   }

   Bool_t getIteratorPointers();
   void initIteratorPointers();
   void setParContainers(); //asd

   void Print(const Option_t *option = "");
   void writeToFile(Bool_t kwtf = kTRUE) {
      kWriteToFile = kwtf;
   }

   void setBeamTime(TString beam){fbeamtime=beam;}

   Bool_t init(void);
   Bool_t finalize(void);
   Int_t  execute(void);

private:
   void buildPSFilename();

   void fillHistStart();
   void fillHistRich();
   void fillHistMdc();
   void fillHistTof();
   void fillHistRpc();
   void fillHistShower();
   void fillHistWall();
   void fillHistEmc();
   void fillHistSpline();
   void fillHistRungeKutta();
   void fillHistRichMDC();
   void fillHistMatching();
   void fillHistPid();
   void fillScalers();
   void fillHistDaqScaler();
   void fillHistShowerRpc();

   void fillGlobalVertex();

   //Johannes Test

   void fillMassSpectrum();

   void finalizeHistStart();
   void finalizeHistRich();
   void finalizeHistMdc();
   void finalizeHistTof();
   void finalizeHistRpc();
   void finalizeHistShower();
   void finalizeHistSpline() {}
   void finalizeHistRichMDC();
   void finalizeHistDaqScaler();
   void finalizeHistPid();
   void finalizeHistShowerRpc();
   void finalizeMassSpectrum();

   HIterator *iterStCal;         //! HStartCal iterator
   HIterator *iterStHit;         //! HStartHit iterator
   HIterator *iterRichCal;       //! HRichCal iterator
   HIterator *iterRichHit;       //! HRichHit iterator
   HIterator *iterMdcRaw;        //! HMdcRaw iterator
   HIterator *iterMdcCal1;       //! HMdcCal1 iterator
   HIterator *iterMdcHit;        //! HMdcHit iterator
   HIterator *iterMdcSeg;        //! HMdcSeg iterator
   HIterator *iterTofHit;        //! HTofHit iterator
   HIterator *iterTofCluster;    //! HTofCluster iterator
   HIterator *iterRpcHit;        //! HRpcHit iterator
   HIterator *iterRpcCluster;    //! HRpcCluster iterator
   HIterator *iterShoHit;        //! HShowerHit iterator
   HIterator *iterFwRaw;         //! HWallRaw iterator
   HIterator *iterFwHit;         //! HWallHit iterator
   HIterator *iterEmcRaw;        //! HEmcRaw iterator
   HIterator *iterEmcCal;        //! HEmcCal iterator
   HIterator *iterEmcClus;       //! HEmcClus iterator
   HIterator *iterSplineTrk;     //! HSplineTrack iterator
   HIterator *iterRungeKuttaTrk; //! HSplineTrack iterator
   HIterator *iterMetaMatch;     //! HMetaMatch iterator
   HIterator *iterParticleCand;  //! HPidTrackCand iterator
   HIterator *iterHTBoxChan;     //!



   HCategory *catSplineTrk;
   HCategory *catRungeKuttaTrk;
   HCategory *catShoHit;
   HCategory *catTfHit;
   HCategory *fCatRpcHit;
   HCategory *fCatRpcCluster;
   HCategory *catTfClust;
   HCategory *fCatParticleCand;

   HSlowPar  *SlowPar;


   TString fbeamtime;          //beam time needed for oraslowmanager


   HQAFileInfoTree TFileInfo;  //Object for File characteristics, which is filled to tree
   HQAStartTree TStart;        //Object for Start detector, which is filled to Tree
   HQARichTree TRich;          //Object for Rich detector, which is filled to Tree
   HQAMdcTree TMdc;            //Object for Mdc detector, which is filled to Tree
   HQATofTree TTof;            //Object for Tof detector, which is filled to Tree
   HQARpcTree TRpc;            //Object for Tof detector, which is filled to Tree
   HQAShowerTree TShw;         //Object for Shower detector, which is filled to Tree
   HQAPhysicsTree TPhy;         //Object with Physics Information which is written to Tree

   HLocation   lTrack;         // location used in the execute for HKickTrack
   HLocation   lMdc;           // location used in the execute for HMdcSeg

   Bool_t kFIRST;
   Bool_t kPDF;
   Bool_t kWriteToFile;   //! boolean for writing hists to gHades output file
   Bool_t isSim;          //! boolean for sim/real
   Bool_t fUseSlowPar;    //! kTRUE(defualt) to use HSlowPar container
   Bool_t makePS();

   Int_t nProcessed;      //! number of events QA-analyzed
   Int_t nEvent;          //! number of events analyzed
   Int_t nCountCalEvents; //! number of calibration events analyzed
   Int_t nInterval;       //! interval number (for variation hists)

   Int_t samplingRate;    //! rate of event sampling
   Int_t intervalSize;    //! number of events per interval (for variation hists)

   TString psFile;        //! PostScript output filename
   TString dstFile;       //! DST filename
   TString fDir;            //! QA output directory

   HQAVariations *varHists; //! Run variation histograms
   HQAHistograms *hists;    //! General QA histograms
   HQAScalers *scalers;     //! Run QA scalers

   Float_t betaMin;         //! beta cut

   TTree  *outputTree;      // This is the tree where important numbers of the different histograms are stored
   TFile *fileTree;         // This is the output file for the outputTree

   //Variables for the ouputTree


   


protected: //asd
   // pointer to used parameter containers
   //HMdcLookupGeom* lookup;   //! lookup table for mapping
   //HMdcLookupRaw*  lookupRaw;//! lookup table for mapping
   //HMdcTimeCut*    timecut;    //! container for time cuts //Not necessary
   HMdcCutStat*    cutStat;    //! container for statistics on cuts //asd

   static Int_t cutResults[4];         // contains 0/1 for cuts in t1,t2 and t2-1 after testTimeCuts()
public:

   ClassDef(HQAMaker, 1) // Hydra task for filling QA histograms and scalers
};



#endif
 hqamaker.h:1
 hqamaker.h:2
 hqamaker.h:3
 hqamaker.h:4
 hqamaker.h:5
 hqamaker.h:6
 hqamaker.h:7
 hqamaker.h:8
 hqamaker.h:9
 hqamaker.h:10
 hqamaker.h:11
 hqamaker.h:12
 hqamaker.h:13
 hqamaker.h:14
 hqamaker.h:15
 hqamaker.h:16
 hqamaker.h:17
 hqamaker.h:18
 hqamaker.h:19
 hqamaker.h:20
 hqamaker.h:21
 hqamaker.h:22
 hqamaker.h:23
 hqamaker.h:24
 hqamaker.h:25
 hqamaker.h:26
 hqamaker.h:27
 hqamaker.h:28
 hqamaker.h:29
 hqamaker.h:30
 hqamaker.h:31
 hqamaker.h:32
 hqamaker.h:33
 hqamaker.h:34
 hqamaker.h:35
 hqamaker.h:36
 hqamaker.h:37
 hqamaker.h:38
 hqamaker.h:39
 hqamaker.h:40
 hqamaker.h:41
 hqamaker.h:42
 hqamaker.h:43
 hqamaker.h:44
 hqamaker.h:45
 hqamaker.h:46
 hqamaker.h:47
 hqamaker.h:48
 hqamaker.h:49
 hqamaker.h:50
 hqamaker.h:51
 hqamaker.h:52
 hqamaker.h:53
 hqamaker.h:54
 hqamaker.h:55
 hqamaker.h:56
 hqamaker.h:57
 hqamaker.h:58
 hqamaker.h:59
 hqamaker.h:60
 hqamaker.h:61
 hqamaker.h:62
 hqamaker.h:63
 hqamaker.h:64
 hqamaker.h:65
 hqamaker.h:66
 hqamaker.h:67
 hqamaker.h:68
 hqamaker.h:69
 hqamaker.h:70
 hqamaker.h:71
 hqamaker.h:72
 hqamaker.h:73
 hqamaker.h:74
 hqamaker.h:75
 hqamaker.h:76
 hqamaker.h:77
 hqamaker.h:78
 hqamaker.h:79
 hqamaker.h:80
 hqamaker.h:81
 hqamaker.h:82
 hqamaker.h:83
 hqamaker.h:84
 hqamaker.h:85
 hqamaker.h:86
 hqamaker.h:87
 hqamaker.h:88
 hqamaker.h:89
 hqamaker.h:90
 hqamaker.h:91
 hqamaker.h:92
 hqamaker.h:93
 hqamaker.h:94
 hqamaker.h:95
 hqamaker.h:96
 hqamaker.h:97
 hqamaker.h:98
 hqamaker.h:99
 hqamaker.h:100
 hqamaker.h:101
 hqamaker.h:102
 hqamaker.h:103
 hqamaker.h:104
 hqamaker.h:105
 hqamaker.h:106
 hqamaker.h:107
 hqamaker.h:108
 hqamaker.h:109
 hqamaker.h:110
 hqamaker.h:111
 hqamaker.h:112
 hqamaker.h:113
 hqamaker.h:114
 hqamaker.h:115
 hqamaker.h:116
 hqamaker.h:117
 hqamaker.h:118
 hqamaker.h:119
 hqamaker.h:120
 hqamaker.h:121
 hqamaker.h:122
 hqamaker.h:123
 hqamaker.h:124
 hqamaker.h:125
 hqamaker.h:126
 hqamaker.h:127
 hqamaker.h:128
 hqamaker.h:129
 hqamaker.h:130
 hqamaker.h:131
 hqamaker.h:132
 hqamaker.h:133
 hqamaker.h:134
 hqamaker.h:135
 hqamaker.h:136
 hqamaker.h:137
 hqamaker.h:138
 hqamaker.h:139
 hqamaker.h:140
 hqamaker.h:141
 hqamaker.h:142
 hqamaker.h:143
 hqamaker.h:144
 hqamaker.h:145
 hqamaker.h:146
 hqamaker.h:147
 hqamaker.h:148
 hqamaker.h:149
 hqamaker.h:150
 hqamaker.h:151
 hqamaker.h:152
 hqamaker.h:153
 hqamaker.h:154
 hqamaker.h:155
 hqamaker.h:156
 hqamaker.h:157
 hqamaker.h:158
 hqamaker.h:159
 hqamaker.h:160
 hqamaker.h:161
 hqamaker.h:162
 hqamaker.h:163
 hqamaker.h:164
 hqamaker.h:165
 hqamaker.h:166
 hqamaker.h:167
 hqamaker.h:168
 hqamaker.h:169
 hqamaker.h:170
 hqamaker.h:171
 hqamaker.h:172
 hqamaker.h:173
 hqamaker.h:174
 hqamaker.h:175
 hqamaker.h:176
 hqamaker.h:177
 hqamaker.h:178
 hqamaker.h:179
 hqamaker.h:180
 hqamaker.h:181
 hqamaker.h:182
 hqamaker.h:183
 hqamaker.h:184
 hqamaker.h:185
 hqamaker.h:186
 hqamaker.h:187
 hqamaker.h:188
 hqamaker.h:189
 hqamaker.h:190
 hqamaker.h:191
 hqamaker.h:192
 hqamaker.h:193
 hqamaker.h:194
 hqamaker.h:195
 hqamaker.h:196
 hqamaker.h:197
 hqamaker.h:198
 hqamaker.h:199
 hqamaker.h:200
 hqamaker.h:201
 hqamaker.h:202
 hqamaker.h:203
 hqamaker.h:204
 hqamaker.h:205
 hqamaker.h:206
 hqamaker.h:207
 hqamaker.h:208
 hqamaker.h:209
 hqamaker.h:210
 hqamaker.h:211
 hqamaker.h:212
 hqamaker.h:213
 hqamaker.h:214
 hqamaker.h:215