ROOT logo
#ifndef HWALLEVENTPLANEF_H
#define HWALLEVENTPLANEF_H

#include "hreconstructor.h"
#include <iostream> 
#include <iomanip>

#include "TVector2.h"
#include "TFile.h"
#include "TH1F.h"
#include "TRandom.h"

using namespace std;

class HCategory;
class HWallEventPlanePar;


class HWallFiredCellsVA {

protected:
    Int_t    nCells;
    TVector2 vCells[304];

    //-Fired Cells Vector Array---------------------------------------------------------------------//
    //----------------------------------------------------------------------------------------------//
    //- this class was introduced to avoid two loops over events and hence two identical cuts      -//
    //- in each of sample (while in reality it triggers small mistakes, such that cut in one sample-//
    //- is updated, but in the second loop the same update of the cut could be forgotten)          -//
    //- so it is better to enable array where identical selection from the first loop is stored    -//
    //----------------------------------------------------------------------------------------------//
public:

    HWallFiredCellsVA(){
	reset();
    }

    void reset(){
	nCells = 0;
    }

    void setCellVect(TVector2 vc){
	if(nCells < 304){
	    vCells[nCells] = vc;
	    nCells++;
	} else {
	    printf("Error from class HWallFiredCellsVA: attempt to ADD to many cells, can't be so many!!\n");
	}
    }

    TVector2 getCellVector(Int_t n){
	if(n >= 0 && n < nCells){
	    return vCells[n];
	} else {
	    TVector2 emptyVect;
	    emptyVect.Set(0.0,0.0);
	    printf("Error from class HWallFiredCellsVA: attempt to GET cell vector which was not defined, n=%i > nCells=%i!!\n", n, nCells);
	    return emptyVect;
	}
    }

    void print(){
	printf("=== HWallFiredCellsVA::print(//begin//) ===\n");
	for(Int_t i = 0; i < nCells; i ++){
	    printf("==> [%i] == ",i); vCells[i].Print();
	}
	printf("=== HWallFiredCellsVA::print(// end //) ===\n");
    }

    Int_t getNumbOfCells(){ return nCells; }

};

class HWallEventPlaneF : public HReconstructor {
protected:
    HCategory*             fWallHitCat;        //!
    HCategory*             fWallEventPlaneCat; //!
    HWallEventPlanePar*    fWallEventPlanePar; //!
    static Bool_t          fUseCorrection;     //!
    HWallFiredCellsVA      fcellsVect;         //!

public:
    HWallEventPlaneF(const Text_t* name="WallEventPlaneF",const Text_t* title="WallEventPlaneF");
    ~HWallEventPlaneF(void);
    Bool_t init(void);
    Bool_t finalize(void) { return kTRUE; }
    Int_t  execute(void);
    static void setUseCorrection(Bool_t use) { fUseCorrection = use; }
    ClassDef(HWallEventPlaneF,0) // Reconstructor for eventplane
};

#endif
 hwalleventplanef.h:1
 hwalleventplanef.h:2
 hwalleventplanef.h:3
 hwalleventplanef.h:4
 hwalleventplanef.h:5
 hwalleventplanef.h:6
 hwalleventplanef.h:7
 hwalleventplanef.h:8
 hwalleventplanef.h:9
 hwalleventplanef.h:10
 hwalleventplanef.h:11
 hwalleventplanef.h:12
 hwalleventplanef.h:13
 hwalleventplanef.h:14
 hwalleventplanef.h:15
 hwalleventplanef.h:16
 hwalleventplanef.h:17
 hwalleventplanef.h:18
 hwalleventplanef.h:19
 hwalleventplanef.h:20
 hwalleventplanef.h:21
 hwalleventplanef.h:22
 hwalleventplanef.h:23
 hwalleventplanef.h:24
 hwalleventplanef.h:25
 hwalleventplanef.h:26
 hwalleventplanef.h:27
 hwalleventplanef.h:28
 hwalleventplanef.h:29
 hwalleventplanef.h:30
 hwalleventplanef.h:31
 hwalleventplanef.h:32
 hwalleventplanef.h:33
 hwalleventplanef.h:34
 hwalleventplanef.h:35
 hwalleventplanef.h:36
 hwalleventplanef.h:37
 hwalleventplanef.h:38
 hwalleventplanef.h:39
 hwalleventplanef.h:40
 hwalleventplanef.h:41
 hwalleventplanef.h:42
 hwalleventplanef.h:43
 hwalleventplanef.h:44
 hwalleventplanef.h:45
 hwalleventplanef.h:46
 hwalleventplanef.h:47
 hwalleventplanef.h:48
 hwalleventplanef.h:49
 hwalleventplanef.h:50
 hwalleventplanef.h:51
 hwalleventplanef.h:52
 hwalleventplanef.h:53
 hwalleventplanef.h:54
 hwalleventplanef.h:55
 hwalleventplanef.h:56
 hwalleventplanef.h:57
 hwalleventplanef.h:58
 hwalleventplanef.h:59
 hwalleventplanef.h:60
 hwalleventplanef.h:61
 hwalleventplanef.h:62
 hwalleventplanef.h:63
 hwalleventplanef.h:64
 hwalleventplanef.h:65
 hwalleventplanef.h:66
 hwalleventplanef.h:67
 hwalleventplanef.h:68
 hwalleventplanef.h:69
 hwalleventplanef.h:70
 hwalleventplanef.h:71
 hwalleventplanef.h:72
 hwalleventplanef.h:73
 hwalleventplanef.h:74
 hwalleventplanef.h:75
 hwalleventplanef.h:76
 hwalleventplanef.h:77
 hwalleventplanef.h:78
 hwalleventplanef.h:79
 hwalleventplanef.h:80
 hwalleventplanef.h:81
 hwalleventplanef.h:82
 hwalleventplanef.h:83
 hwalleventplanef.h:84
 hwalleventplanef.h:85
 hwalleventplanef.h:86
 hwalleventplanef.h:87
 hwalleventplanef.h:88
 hwalleventplanef.h:89
 hwalleventplanef.h:90
 hwalleventplanef.h:91
 hwalleventplanef.h:92