#ifndef HMDC34CLFINDER_H
#define HMDC34CLFINDER_H
#include "TObject.h"
#include "hlocation.h"
#include "hmdclistgroupcells.h"
#include "hmdclistcells.h"
#include "hmdcgeomobj.h"
#include "hparset.h"
#include "hgeomvector.h"
class HMdcClus;
class HMdcSeg;
class TH2C;
class HKickPlane2;
class HMdcGetContainers;
class HMdcDetector;
class HSpecGeomPar;
class HMdcSizesCells;
class HMdcGeomPar;
class HCategory;
class HMdcClFnStack;
class HMdcClFnStacksArr;
class HMdcClustersArrs;
class HMdcCluster;
class HMdc34ClFinderLayer: public TObject {
protected:
public:
HMdcLayListCells* cells;
Short_t nBinX;
Short_t* yBin;
Int_t yFirst;
Int_t nYLines;
Int_t wOrType;
Short_t* xBin1;
Short_t* xBin2;
Int_t nCells;
Double_t tgY;
Double_t tgZ;
Double_t y0[2];
Double_t z0[2];
Double_t yStep;
Double_t zStep;
Int_t nPSegOnKick[2][2];
Short_t* cellShUp;
Short_t* cellShDown;
HMdc34ClFinderLayer(Int_t sec, Int_t mod, Int_t layer);
~HMdc34ClFinderLayer();
Bool_t createArrayBins(Short_t nBins);
void setCellsList(HMdcLayListCells& event) {cells = &event;}
ClassDef(HMdc34ClFinderLayer,0)
};
class HMdc34ClFinderMod : public TObject {
protected:
TObjArray* array;
public:
HMdc34ClFinderMod(Int_t sec, Int_t mod);
~HMdc34ClFinderMod();
HMdc34ClFinderLayer& operator[](Int_t i) {
return *static_cast<HMdc34ClFinderLayer*>((*array)[i]);
}
Int_t getNCells(void);
void setCellsList(HMdcModListCells& event);
ClassDef(HMdc34ClFinderMod,0)
};
class HMdcProjPlot : public HMdcPlane {
protected:
public:
Double_t yMin,yMax;
Double_t xMin,xMax;
Double_t xMinD,xMaxD;
Short_t nBinX;
Double_t stX;
Short_t nBinY;
Double_t stY;
Short_t* xMinL;
Short_t* xMaxL;
Short_t* yMinL;
Double_t* xBinsPos;
Double_t* yBinsPos;
Float_t xFirstBin;
Float_t yFirstBin;
UChar_t* plModF;
UChar_t* plModS;
Int_t size;
Int_t sizeBAr;
UChar_t* plotBArSc;
Int_t* plotBArSc4b;
static UChar_t* weights;
static Int_t wtArrSize;
Int_t minBin4Sc;
Int_t maxBin4Sc;
TH2C* rootPlot;
TH2C* rootPlotV2;
HMdcProjPlot(UChar_t mSeg, Int_t inBinX, Int_t inBinY);
~HMdcProjPlot();
void setEdges(Double_t iyMin, Double_t ixMinD, Double_t ixMaxD,
Double_t iyMax, Double_t ixMin, Double_t ixMax);
void print(void);
void clearArr(void);
void clearBitArr(void);
Int_t xbin(Int_t bin) const {return bin%nBinX;}
Int_t ybin(Int_t bin) const {return bin/nBinX;}
Bool_t testBin(Int_t nb) const {return HMdcBArray::testAndUnset(plotBArSc,nb);}
TH2C* getPlot(const Char_t* name,const Char_t* title);
TH2C* getPlotV2(const Char_t* name,const Char_t* title);
ClassDef(HMdcProjPlot,0)
};
class HMdc34ClFinderSec : public TObject {
protected:
TObjArray* array;
Bool_t mergeFlag;
Int_t sector;
Int_t lMods[4];
UChar_t mSeg[2];
HKickPlane2* fkick;
HGeomVector target[2];
HMdcProjPlot* prPlotSeg2;
HGeomVector seg1[5];
HGeomVector dirSeg1[5];
HGeomVector segOnKick[5];
Double_t al[4];
Double_t bl[4];
Double_t cl[4];
Int_t nbX[4];
Int_t minAmp[4];
Int_t maxAmp[4];
Bool_t notEnoughWrs;
Int_t nearbyBins[8];
HMdcClFnStack* stack;
HMdcClFnStacksArr* stacksArr;
Short_t* xMinClLines;
Short_t* xMaxClLines;
Int_t nLMinCl;
Int_t nLMaxCl;
Bool_t isClstrInited;
Int_t indexPar;
Int_t indexFCh;
Int_t indexLCh;
Int_t* xCMin[4];
Int_t* xCMax[4];
Int_t* cXMinM;
Int_t* cXMaxM;
Int_t* xMinM2;
Int_t* xMaxM2;
UChar_t* cPlMod;
HMdc34ClFinderMod* cFMod;
HMdc34ClFinderLayer* cFLay;
Int_t nBinX;
Int_t cell;
Int_t nBinYM2;
Int_t shUp;
Int_t shDown;
UChar_t add;
Int_t nYLinesM1;
Short_t* xBin1L;
Short_t* xBin2L;
Int_t shUpN;
Int_t shDownN;
Bool_t test;
Int_t ny1;
Int_t ny2;
Int_t nbL;
Int_t nbF;
HCategory* fClusCat;
HLocation locClus;
Bool_t isGeant;
Int_t typeClFinder;
Int_t realTypeClFinder;
HMdcClustersArrs* pClustersArrs;
Int_t clusArrSize;
HMdcCluster* clusArr;
Int_t nClsArr;
HMdcCluster* cluster;
protected:
HMdc34ClFinderSec(void) {}
~HMdc34ClFinderSec();
void makeModS2Plot(Int_t mod);
void makeSeg2Plot(void);
void makeSeg2PlotTp2(void);
Int_t calcYbin(Int_t upDo,Int_t leRi,Int_t cell);
Int_t scanPlotSeg2(void);
Bool_t calcClusterSeg2FixedLevel(Int_t nBin);
Bool_t calcClusterSeg2FloatLevel(Int_t nBin);
Bool_t fillClusterSeg2(void);
Int_t findClustersSeg2(void);
void initCluster(Int_t nBin,UChar_t amp);
void reinitCluster(Int_t nBin,UChar_t amp);
void addBinInCluster(Int_t nBin,UChar_t wt);
Bool_t increaseClusterNum(void);
void mergeClustSeg2(void);
Int_t fillClusCat(void);
Bool_t calcLayerProjVar(Int_t lay);
Bool_t setNextCell(void);
void setYLimits(void);
Bool_t setXLimits(Int_t ny, Short_t nx1,Short_t nx2);
void makeLayProjV1(Int_t lay);
void makeLayProjV1b(Int_t lay);
void makeLayProjV2(Int_t lay);
void clearPrMod(Int_t mod=-1);
void clearPrSegTp2(void);
Bool_t testMaxAmp(void);
public:
HMdc34ClFinderMod& operator[](Int_t i) {
return *static_cast<HMdc34ClFinderMod*>((*array)[i]);
}
void clear(void);
void setMinBin(Int_t *mBin);
Bool_t notEnoughWires(void) const {return notEnoughWrs;}
Int_t findClustersSeg2(HMdcSeg* fSeg,
HMdcClus* pClus,
Int_t *mBin=0);
Int_t findClustersSeg2(HMdcClus* pClus,
Int_t *mBin=0);
TH2C* getPlot(const Char_t* name,
const Char_t* title,Int_t ver=0);
HMdcProjPlot* getPlotSeg2(void) {return prPlotSeg2;}
Int_t getNBinX(void) {return prPlotSeg2->nBinX;}
Int_t getNBinY(void) {return prPlotSeg2->nBinY;}
void setTargetF(const HGeomVector& vec) {target[0]=vec;}
void setTargetL(const HGeomVector& vec) {target[1]=vec;}
const HGeomVector& getTargetF(void) {return target[0];}
const HGeomVector& getTargetL(void) {return target[1];}
void setTypeClFinder(Int_t type) {typeClFinder=type;}
Int_t getTypeClFinder(void) {return typeClFinder;}
void setCellsList(HMdcSecListCells& event);
void donotMergeClusters(void) {mergeFlag = kFALSE;}
HMdc34ClFinderSec(Int_t sec, Int_t inBinX, Int_t inBinY);
HGeomVector* getTargetArr(void) {return target;}
UChar_t* getMSeg(void) {return mSeg;}
void setClusCut(HCategory* pClCat) {fClusCat = pClCat;}
void setKickPlane(HKickPlane2* pkick) {fkick = pkick;}
void setXMinClLines(Short_t* xMin) {xMinClLines = xMin;}
void setXMaxClLines(Short_t* xMax) {xMaxClLines = xMax;}
void setClFnStack(HMdcClFnStack* pst) {stack = pst;}
void setClFnStArr(HMdcClFnStacksArr* psa) {stacksArr = psa;}
Int_t mdcFlag(Int_t m) {return lMods[m];}
ClassDef(HMdc34ClFinderSec,0)
};
class HMdc34ClFinder : public HParSet {
protected:
static HMdc34ClFinder* fMdc34ClFinder;
TObjArray* array;
HMdcGetContainers* fGetCont;
HMdcDetector* fMdcDet;
HSpecGeomPar* fSpecGeomPar;
HMdcSizesCells* fSizesCells;
HKickPlane2* fKickPlane;
HMdcGeomPar* fMdcGeomPar;
HCategory* fMdcClusCat;
Short_t* xMinClLines;
Short_t* xMaxClLines;
HMdcClFnStack* stack;
HMdcClFnStacksArr* stacksArr;
Bool_t mergeFlag;
Int_t nBinX;
Int_t nBinY;
static Bool_t quietMode;
static Bool_t useFixedLevel;
public:
static HMdc34ClFinder* getExObject(void);
static HMdc34ClFinder* getObject(void);
static void deleteCont(void);
static void setQuietMode(Bool_t quiet) {quietMode=quiet;}
static Bool_t getQuietMode() {return quietMode;}
static void setUseFixedLevel(void) {useFixedLevel=kTRUE ;}
static void setUseFloatLevel(void) {useFixedLevel=kFALSE;}
static Bool_t getUseFixedLevelFlag(void) {return useFixedLevel;}
HMdc34ClFinderSec& operator[](Int_t i) {
return *static_cast<HMdc34ClFinderSec*>((*array)[i]);
}
Bool_t init(HParIo* input,Int_t* set) {return kTRUE;}
Bool_t initContainer(HMdcEvntListCells& event);
void setCellsList(HMdcEvntListCells& event);
void clear(void);
void donotMergeClusters(void) {mergeFlag=kFALSE;}
void setPrPlotSize(Int_t nx,Int_t ny=-1);
protected:
HMdc34ClFinder(const Char_t* name = "Mdc34ClFinder",
const Char_t* title = "Cluster finder for outer MDCs",
const Char_t* context = "");
~HMdc34ClFinder();
Bool_t calcTarget(Int_t sec);
Bool_t calcProjPlaneSeg2(Int_t sec);
Bool_t calcSizePlotSeg2(Int_t sec);
Bool_t calcWiresProj(Int_t sec);
void calcCrossLines(HGeomVector& p1l1, HGeomVector& p2l1,
HGeomVector& p1l2, HGeomVector& p2l2,
HGeomVector& cross);
Double_t xLine(HGeomVector& p1, HGeomVector& p2, Double_t yi);
ClassDef(HMdc34ClFinder,0)
};
#endif /*!HMDC34CLFINDER_H*/
Last change: Sat May 22 12:59:35 2010
Last generated: 2010-05-22 12:59
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.