Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcDriftChamber.h
Go to the documentation of this file.
1#ifndef ROOT_THcDriftChamber
2#define ROOT_THcDriftChamber
3
5// //
6// THcDriftChamber //
7// //
9
10#include "THaSubDetector.h"
12#include "TClonesArray.h"
13#include "TMatrixD.h"
14
15#include <map>
16#include <vector>
18 std::vector<Int_t> SpNHits; //< [] Number of Hits in space point
19 std::vector<Int_t> SpHitIndex; //< []*SpNHits Hit index for each hit in sp point
20 void clear() {
21 SpNHits.clear();
22 SpHitIndex.clear();
23 }
24};
25
26#define MAX_SPACE_POINTS 100
27#define MAX_HITS_PER_POINT 20
28
29//#include "TMath.h"
30
31
32//class THaScCalib;
33class TClonesArray;
34class THcSpacePoint;
35
36
38
39public:
40 THcDriftChamber( const char* name, const char* description, Int_t chambernum,
41 THaDetectorBase* parent = NULL );
42 virtual ~THcDriftChamber();
43
44 virtual Int_t Decode( const THaEvData& );
45 virtual EStatus Init( const TDatime& run_time );
46
47 virtual void AddPlane(THcDriftChamberPlane *plane);
48 virtual Int_t ApplyCorrections( void );
49 virtual void ProcessHits( void );
50 virtual Int_t FindSpacePoints( void ) ;
51 virtual Int_t NewFindSpacePoints( void ) ;
52 virtual void PrintDecode( void ) ;
53 virtual void CorrectHitTimes( void ) ;
54 virtual void LeftRight(void);
55
56
57 virtual void Clear( Option_t* opt="" );
58
59 Int_t GetNHits() const { return fNhits; }
61 Int_t GetNTracks() const { return fTrackProj->GetLast()+1; }
62 const TClonesArray* GetTrackHits() const { return fTrackProj; }
64 Int_t GetChamberNum() const { return fChamberNum;}
65 Double_t GetZPos() const {return fZPos;}
66 // friend class THaScCalib;
68
69
70 THcDriftChamber(); // for ROOT I/O
71protected:
73
74 // Calibration
75
76 // Per-event data
80
81 Int_t fNPlanes; // Number of planes in the chamber
82
84
85 // HMS Specific
86 Int_t YPlaneInd; // Index of Yplane for this chamber
87 Int_t YPlanePInd; // Index of Yplanep for this chamber
88 Int_t YPlaneNum; // Absolute plane number of Yplane
89 Int_t YPlanePNum; // Absolute plane number of Yplanep
90 // SOS Specific
91 Int_t XPlaneInd; // Index of Xplane for this chamber
92 Int_t XPlanePInd; // Index of Xplanep for this chamber
93 Int_t XPlaneNum; // Absolute plane number of Xplane
94 Int_t XPlanePNum; // Absolute plane number of Xplanep
95
96 // Parameters
97 Int_t fMinHits; // Minimum hits required to do something
98 Int_t fMaxHits; // Maximum required to do something
99 Int_t fMinCombos; // Minimum # pairs in a space point
108 Double_t fRatio_xpfp_to_xfp; // Used in selecting stubs
113 Double_t fMaxDist; // Max dist used in EasySpacePoint methods
120
121 std::vector<THcDriftChamberPlane*> fPlanes;
122 // THcDriftChamberPlane* fPlanes[20]; // List of plane objects
123
124 TClonesArray* fTrackProj; // projection of track onto scintillator plane
125 // and estimated match to TOF paddle
126 // void ClearEvent();
127 void DeleteArrays();
128 virtual Int_t ReadDatabase( const TDatime& date );
129 virtual Int_t DefineVariables( EMode mode = kDefine );
130
131 void Setup(const char* name, const char* description);
132 Int_t FindEasySpacePoint_HMS(Int_t yplane_hitind, Int_t yplanep_hitind);
133 Int_t FindEasySpacePoint_SOS(Int_t xplane_hitind, Int_t xplanep_hitind);
137 void ChooseSingleHit(void);
138 void SelectSpacePoints(void);
141 Int_t* plane_list, UInt_t bitpat,
142 Int_t* plusminus, Double_t* stub);
143
144 std::vector<THcDCHit*> fHits; /* All hits for this chamber */
157 Int_t fEasySpacePoint; /* This event is an easy space point */
158 SpacePointHitOutputData fSpHit; //< Space point hit structure
159
161 std::map<int,TMatrixD> fAA3Inv;
162
164
165 ClassDef(THcDriftChamber,0) // A single drift chamber
166};
167
169
170#endif
int Int_t
unsigned int UInt_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Class for a a single Hall C horizontal drift chamber plane.
Subdetector class for a single drift chamber with several planes.
Int_t fRemove_Sppt_If_One_YPlane
std::map< int, TMatrixD > fAA3Inv
SpacePointHitOutputData fSpHit
virtual Int_t DefineVariables(EMode mode=kDefine)
Int_t GetNTracks() const
Double_t * stubcoef[4]
virtual void ProcessHits(void)
Int_t SpacePointMultiWire(void)
Int_t DestroyPoorSpacePoints(void)
TClonesArray * GetSpacePointsP() const
TClonesArray * fTrackProj
Int_t GetNSpacePoints() const
TClonesArray * fVPlaneClusters
Int_t FindEasySpacePoint_SOS(Int_t xplane_hitind, Int_t xplanep_hitind)
Int_t FindEasySpacePoint_HMS(Int_t yplane_hitind, Int_t yplanep_hitind)
Double_t GetZPos() const
TClonesArray * fUXPlaneClusters
virtual void PrintDecode(void)
virtual void CorrectHitTimes(void)
std::vector< THcDCHit * > fHits
Double_t ** fStubCoefs
virtual Int_t ApplyCorrections(void)
TClonesArray * fSpacePoints
void SetHMSStyleFlag(Int_t flag)
Int_t fFixPropagationCorrection
std::vector< THcDriftChamberPlane * > fPlanes
Int_t FindHardSpacePoints(void)
virtual Int_t Decode(const THaEvData &)
const TClonesArray * GetTrackHits() const
virtual Int_t NewFindSpacePoints(void)
UInt_t Count1Bits(UInt_t x)
virtual Int_t FindSpacePoints(void)
void Setup(const char *name, const char *description)
virtual void Clear(Option_t *opt="")
Double_t fRatio_xpfp_to_xfp
THaDetectorBase * fParent
TClonesArray * fUPlaneClusters
TClonesArray * fXPlaneClusters
TClonesArray * fVXPlaneClusters
virtual void AddPlane(THcDriftChamberPlane *plane)
virtual void LeftRight(void)
void SelectSpacePoints(void)
Int_t GetChamberNum() const
virtual Int_t ReadDatabase(const TDatime &date)
Int_t GetNHits() const
Double_t fSpacePointCriterion
Double_t FindStub(Int_t nhits, THcSpacePoint *sp, Int_t *plane_list, UInt_t bitpat, Int_t *plusminus, Double_t *stub)
Class representing a single hit DC.
Int_t GetLast() const override
std::vector< Int_t > SpHitIndex
std::vector< Int_t > SpNHits