QwAnalysis
QwDriftChamberHDC.h
Go to the documentation of this file.
1 /**********************************************************\
2 * File: QwDriftChamberHDC.h *
3 * *
4 * Author: P. M. King *
5 * Time-stamp: <2008-07-08 15:40> *
6 \**********************************************************/
7 
8 
9 #ifndef __QWDRIFTCHAMBERHDC__
10 #define __QWDRIFTCHAMBERHDC__
11 
12 #include "QwDriftChamber.h"
13 #include "QwOptions.h"
14 
15 #define OK 0
16 
17 ///
18 /// \ingroup QwTrackingg
19 class QwDriftChamberHDC: public QwDriftChamber, public MQwSubsystemCloneable<QwDriftChamberHDC> {
20  /******************************************************************
21  * Class: QwDriftChamberHDC
22  *
23  *
24  ******************************************************************/
25  public:
26  QwDriftChamberHDC(TString name): VQwSubsystem(name), QwDriftChamber(name,fTDCHits) { };
27  virtual ~QwDriftChamberHDC() { };
28 
29  /* Unique virtual member functions from QwDrifChamber base class */
30 
31 
32  // void ReportConfiguration();
34  void ProcessEvent();
35  // Int_t ProcessConfigurationBuffer(const UInt_t roc_id, const UInt_t bank_id, UInt_t* buffer, UInt_t num_words);
36  // void PrintConfigrationBuffer(UInt_t *buffer, UInt_t num_words);
37  Int_t LoadChannelMap ( TString mapfile ) ;
38  void ClearEventData();
39  static void DefineOptions(QwOptions& options);
40  void ProcessOptions(QwOptions& options);
41 
42  protected:
43  // VDC and HDC
44  void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data);
45  Int_t AddChannelDefinition();
46  Int_t BuildWireDataStructure(const UInt_t chan, const EQwDetectorPackage package, const Int_t octant, const Int_t plane, const Int_t wire);
47  Double_t CalculateDriftDistance(Double_t drifttime, QwDetectorID detector);
48 
50  void ConstructHistograms(TDirectory *folder, TString &prefix) ;
51  void FillHistograms();
52 
53  Int_t LoadTimeWireOffset(TString t0_map);
54  void LoadTtoDParameters(TString ttod_map);
56  // void ApplyTimeCalibration();
57 
58  void UpdateHits(); // be executed in ProcessEvent()
59 
60  // HDC
61  Double_t trig_h1;//this will keep the first hit time of trig_h1 (plane 7)
62  std::vector< std::vector< std::vector<Double_t> > > fTimeWireOffsets;
63  std::vector< Double_t> fTtoDNumbers;
64 
65  Int_t fR2Octant;
66 
67 
68 };
69 
70 #endif
std::vector< std::vector< std::vector< Double_t > > > fTimeWireOffsets
An options class.
Definition: QwOptions.h:133
Double_t CalculateDriftDistance(Double_t drifttime, QwDetectorID detector)
EQwDetectorPackage
Definition: QwTypes.h:70
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
Definition: VQwSubsystem.h:209
static void DefineOptions()
Define options function (note: no virtual static functions in C++)
Definition: VQwSubsystem.h:88
void FillHistograms()
Fill the histograms for this subsystem.
void ProcessOptions(QwOptions &options)
Process the command line options.
void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
QwDriftChamberHDC(TString name)
The pure virtual base class of all subsystems.
Definition: VQwSubsystem.h:59
Int_t LoadChannelMap(TString mapfile)
Mandatory map file definition.
Int_t BuildWireDataStructure(const UInt_t chan, const EQwDetectorPackage package, const Int_t octant, const Int_t plane, const Int_t wire)
std::vector< Double_t > fTtoDNumbers
An options class which parses command line, config file and environment.
virtual ~QwDriftChamberHDC()
void LoadTtoDParameters(TString ttod_map)
std::vector< QwHit > fTDCHits
Int_t LoadTimeWireOffset(TString t0_map)