Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DemuxFast.h

Go to the documentation of this file.
00001 #ifndef DEMUX_FAST_H
00002 #define DEMUX_FAST_H
00003 
00004 class DemuxFast;             // Forward declaration of THIS class 
00005 class MomNavigator;        // Forward declaration of this class
00006 class CandDigitListHandle; // Forward declaration of this class
00007 
00008 //class PlanePossibility;
00009 #include "Plex/PlexSEIdAltL.h"
00010 #include "UgliGeometry/UgliGeomHandle.h"
00011 #include "UgliGeometry/UgliStripHandle.h"
00012 #include "JobControl/JobCModule.h"
00013 #include "MyDemuxPatternMaster.h"
00014 #include "TTree.h"
00015 #include "TNamed.h"
00016 #include "TCanvas.h" // ROOT include file for drawing canvases
00017 #include "TH2.h"     // ROOT include file for 2d histograms
00018 
00019 class TCanvas;
00020 class TPad;
00021 class TPolyMarker;
00022 class TH2F;
00023 
00024 const int DISPLAY_TYPE = 4;
00025 
00026 enum DemuxSearchType{SEARCH_BACKWARDS,SEARCH_GAP,SEARCH_GAP_F,SEARCH_GAP_B,SEARCH_FORWARDS,SEARCH_SINGLES}; 
00027 
00028 
00029 
00030 typedef struct {
00031   PlexSEIdAltL* altList1;
00032   Int_t         alt1;
00033   PlexSEIdAltL* altList2;
00034   Int_t         alt2;
00035   Int_t         status;
00036 }DemuxPossibility;
00037 
00038 typedef struct {
00039   Int_t         iplane;
00040   Int_t         lowplane;
00041   Int_t         highplane;
00042   DemuxSearchType searchType;
00043   bool            goodTactic;
00044 }DemuxSearchTactic;
00045 
00046 
00047 
00048 class DemuxFast : public JobCModule, public TObject
00049 {
00050 
00051  public:
00052 
00053   DemuxFast();
00054   void BeginJob();                             
00055   JobCResult Ana(const MomNavigator *mom);
00056   JobCResult Reco(MomNavigator *mom);  
00057   void EndJob();                               
00058   void ResetMap(int ne, int nw);
00059   void PrintMap(int ne, int nw);
00060   void PrintWhatRemains();
00061   void MakeMap(int iplane,bool useTargets=false);
00062   void MakeMap(DemuxSearchTactic);
00063   void GroupHits(int ecount, int wcount);
00064   void MakeSearchTactics();
00065   void MakeSearchTacticsX();
00066   void MakeSearchTacticsY();
00067   void DemuxSingles(DemuxSearchTactic);
00068   bool SelectHits(bool makeGold, bool useGold=false);
00069   void DemuxHits(int ie, int iw , int is);
00070   void GoldHits(int ie, int iw , int is);
00071   void MakeGoldGuide();
00072   void DemuxHitE(PlexSEIdAltL* pAlt, int is);
00073   void DemuxHitW(PlexSEIdAltL* pAlt, int is);
00074   void DemuxHitE(int ie, int is);
00075   void DemuxHitW(int iw, int is);
00076   bool DemuxBigGroup(int ig,bool gold);
00077   void NewTactic(DemuxSearchTactic oldTactic);
00078   float IsItXTalk(int iew, int iplane, int iva, int ipixel);
00079 
00080  private:
00081 
00082   MyDemuxPatternMaster* pMaster;
00083   std::vector<PlexSEIdAltL*>PlanesAltListsE[500];
00084   std::vector<PlexSEIdAltL*>PlanesAltListsW[500];
00085   std::vector<DemuxSearchTactic>searchTactics;
00086   PlaneView::PlaneView_t  kView; 
00087   UgliGeomHandle* _pUgh;
00088 
00089   /* -------------Member Functions---------------- */
00090 
00091                                
00092   /* --------------Cuts--------------------------- */
00093 
00094   float _cutRatioLow;
00095   float _cutRatioHigh;
00096   float _cutPEmin;
00097   float _cutFractionMin;
00098   float _cutSigmaQ;
00099   float _cutTrackTargetQ;
00100 
00101   /* --------------Data Structures---------------- */
00102 
00103   bool _amap[100][100];
00104   int  _smap[100][100];
00105   bool _bmap[100][100];
00106   int  _UVmap[500];
00107   bool amWriting;
00108   bool amPSing;
00109   bool amHisting;
00110   bool _searched[500];
00111 
00112   float pixelE[500][3][16];
00113   float pixelW[500][3][16];
00114   float _qTotE[500];
00115   float _qTotW[500];
00116   float _qMaxE[500];
00117   float _qMaxW[500];
00118 
00119   float _goldGuide[500];
00120   float _sgoldGuide[500];
00121   std::vector <int> targets;
00122 
00123   PlexSEIdAltL* _pAmapE[100];
00124   PlexSEIdAltL* _pAmapW[100];
00125 
00126   int _vaChip0[18];
00127     
00128   int  _rangeWindow;
00129 
00130   bool  efound[100];
00131   bool  wfound[100];
00132   int   ngroup;
00133   int   ningroupe[100];
00134   int   ningroupw[100];
00135   int   egroup[100][100];
00136   int   wgroup[100][100];
00137 
00138   int   ecount;
00139   int   wcount;
00140   int   currentPlane;
00141   int   planehit[500];
00142   int   hitmap[500][100];
00143   float qhitmapE[500][100];
00144   float qhitmapW[500][100];
00145   
00146   int   NdemuxedHitsU;
00147   int   NdemuxedHitsV;
00148   int   NdemuxedHits;
00149   std::vector<int>   demuxedHitPlane;
00150   std::vector<int>   demuxedHitStrip;
00151   std::vector<float> demuxedHitQ;
00152  
00153   int   demuxedmap[500][100];
00154   int   goldplanehit[500];
00155   int   goldhitmap[500][100];
00156 
00157   ClassDef(DemuxFast,0);
00158 }; 
00159 #endif // DEMUX_FAST_H

Generated on Mon Feb 15 11:06:37 2010 for loon by  doxygen 1.3.9.1