QwAnalysis
QwDriftChamberVDC.h
Go to the documentation of this file.
1 /**********************************************************\
2  * File: QwDriftChamberVDC.h *
3  * *
4  * Author: P. M. King, Rakitha Beminiwattha *
5  * Time-stamp: <2008-07-16 15:40> *
6 \**********************************************************/
7 
8 
9 #ifndef __QWDRIFTCHAMBERVDC__
10 #define __QWDRIFTCHAMBERVDC__
11 
12 #include "QwDriftChamber.h"
13 #include "QwDelayLine.h"
14 #include "QwOptions.h"
15 
16 #include <cstdlib>
17 #include <cstdio>
18 #include <utility>
19 
20 ///
21 /// \ingroup QwTracking
22 class QwDriftChamberVDC: public QwDriftChamber, public MQwSubsystemCloneable<QwDriftChamberVDC> {
23  /******************************************************************
24  * Class: QwDriftChamberVDC
25  *
26  *
27  ******************************************************************/
28  public:
29  QwDriftChamberVDC(TString name);
30  virtual ~QwDriftChamberVDC() { };
31 
32  /* Unique virtual member functions from QwDrifChamber base class */
33 
34 
35  // void ReportConfiguration();
37  void ProcessEvent();
38  // Int_t ProcessConfigurationBuffer(const UInt_t roc_id, const UInt_t bank_id, UInt_t* buffer, UInt_t num_words);
39  // void PrintConfigrationBuffer(UInt_t *buffer, UInt_t num_words);
40  Int_t LoadChannelMap(TString mapfile);
41 
42 
43  // VDC
44  // using QwDriftChamber::CalculateDriftDistance;
45  static void DefineOptions(QwOptions& options);
46  void ProcessOptions(QwOptions& options);
47 
48  //Int_t LoadMap ( TString& ); //read the TDC convert QwDelayLine map
49  void ReadEvent ( TString& ); //read the events file
50 
51  void ClearEventData();
52 
53 
54 
55 
56 
57  protected:
58 
59  // VDC and HDC
60  void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data);
61  Int_t AddChannelDefinition();
62  Int_t BuildWireDataStructure(const UInt_t chan, const EQwDetectorPackage package, const Int_t octant, const Int_t plane, const Int_t wire);
63  Double_t CalculateDriftDistance(Double_t drifttime, QwDetectorID detector);
64 
66  void ConstructHistograms(TDirectory *folder, TString &prefix);
67  void FillHistograms();
68 
69  Int_t LoadTimeWireOffset(TString t0_map);
70  void LoadTtoDParameters(TString ttod_map);
72  void UpdateHits();
73  // void ApplyTimeCalibration();
74 
75  // VDC
76  void GetHitList(QwHitContainer & grandHitContainer)
77  {
78  if(fUseTDCHits) grandHitContainer.Append(fTDCHits);
79  else grandHitContainer.Append(fWireHits);
80  };
81 
82 
83 
84  Bool_t fUseTDCHits;
86  Int_t fR3Octant;
87  static const UInt_t kBackPlaneNum;
88  static const UInt_t kLineNum;
89  std::vector< std::vector<QwDelayLine> > fDelayLineArray; //indexed by backplane and line number
90  std::vector< std::vector<QwDelayLineID> > fDelayLinePtrs; //indexed by slot and channel number
91  std::vector< QwHit > fWireHitsVDC;
92  std::vector< std::vector< std::vector<Double_t> > > fTimeWireOffsets;
93  std::vector< Double_t> fTtoDNumbers;
94 
95 };
96 
97 #endif
QwDriftChamberVDC(TString name)
void LoadTtoDParameters(TString ttod_map)
Int_t BuildWireDataStructure(const UInt_t chan, const EQwDetectorPackage package, const Int_t octant, const Int_t plane, const Int_t wire)
virtual ~QwDriftChamberVDC()
std::vector< Double_t > fTtoDNumbers
static const UInt_t kLineNum
Double_t CalculateDriftDistance(Double_t drifttime, QwDetectorID detector)
An options class.
Definition: QwOptions.h:133
void ProcessOptions(QwOptions &options)
Process the command line options.
static const UInt_t kBackPlaneNum
void GetHitList(QwHitContainer &grandHitContainer)
Get the hit list.
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
std::vector< std::vector< std::vector< Double_t > > > fTimeWireOffsets
std::vector< std::vector< QwDelayLine > > fDelayLineArray
Int_t LoadTimeWireOffset(TString t0_map)
std::vector< std::vector< QwDelayLineID > > fDelayLinePtrs
Int_t LoadChannelMap(TString mapfile)
Mandatory map file definition.
void FillRawTDCWord(Int_t bank_index, Int_t slot_num, Int_t chan, UInt_t data)
An options class which parses command line, config file and environment.
std::vector< QwHit > & fWireHits
std::vector< QwHit > fWireHitsVDC
std::vector< QwHit > fTDCHits
void Append(const QwHitContainer &mylist)
void FillHistograms()
Fill the histograms for this subsystem.
void ReadEvent(TString &)