FairRoot/PandaRoot
PndMdtPointsToWaveform.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------
2 // File and Version Information:
3 // $Id: Exp $
4 //
5 // Description:
6 // Class PndMdtPointsToWaveform. Module to take the point list for the
7 // mdt induced current.
8 //
9 //
10 // Author List:
11 // Jifeng Hu, hu@to.infn.it, Torino University
12 //----------------------------------------------------------------------
13 //#pragma once
14 #ifndef PndMdtPointsToWaveform_H
15 #define PndMdtPointsToWaveform_H
16 
17 #include <PndPersistencyTask.h>
18 #include "PndMdtWaveform.h"
19 #include "TVector3.h"
20 #include <TFile.h>
21 #include <TTree.h>
22 
23 class TClonesArray;
24 //class PndMdtDigiPar;
25 //class PndMdtGeoPar;
27 class PndMdtParamDigi;
28 class PndMdtIGeometry;
29 
31 {
32 
33  public:
34 
35  // Constructors
36 
37  PndMdtPointsToWaveform(Int_t verbose=0, Bool_t storewaves=kTRUE);
38 
39  // Destructor
40 
41  virtual ~PndMdtPointsToWaveform();
42 
44  virtual InitStatus Init();
45 
46 
48  virtual void Exec(Option_t* opt);
49 
50  void SetStorageOfData(Bool_t val); // Method to specify whether waveforms are stored or not.
51 
53 
54  void FinishTask();
55  private:
56  TClonesArray* fMcTrackArray;
57 
59  TClonesArray* fPointArray;
60 
61  /* output array for general sim */
62  TClonesArray* fWaveformArray;
63 
64  /* output array for time-based sim */
67 
70 
71 // PndMdtDigiPar* fDigiPar; /** Digitisation parameter container **/
72 // PndMdtGeoPar* fGeoPar; /** Geometry parameter container **/
74  virtual void SetParContainers();
75  virtual void exec_t();
76  virtual void exec_e();
77  Int_t PdgToIndex(Int_t pdg);
78 
80  Int_t fVerbose;
81  //counters for task
82  Int_t HowManyPoint;
84 
87 
88  Bool_t Digitize(PndMdtWaveform* theWf, Double_t& time, Double_t& amp, Bool_t isWire);
89 
90  struct key
91  {
92  key(){}
93  key(Int_t _tid, Int_t _detid) : TrkID(_tid), DetID(_detid){}
94  bool operator < (const key& rhs) const {
95  if(TrkID < rhs.TrkID) return true;
96  if(TrkID == rhs.TrkID) return DetID < rhs.DetID;
97  return false;
98  }
99  bool operator == (const key& rhs) const {
100  return TrkID == rhs.TrkID && DetID == rhs.DetID;
101  }
102  Int_t TrkID;//track id
103  Int_t DetID;//detector id
104  };
105 
106  TFile* fFile;
107  TTree* tTree;
113  Int_t fMod;
114  Int_t fPid;
115 
117 };
118 
119 #endif
120 
121 
122 
123 
124 
Bool_t Digitize(PndMdtWaveform *theWf, Double_t &time, Double_t &amp, Bool_t isWire)
PndMdtWaveformWriteoutBuffer * fDataBuffer
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
PndMdtParamDigi * fParamDigiModel
#define verbose
bool operator==(const key &rhs) const
PndMdtPointsToWaveform(Int_t verbose=0, Bool_t storewaves=kTRUE)
Double_t
ClassDef(PndMdtPointsToWaveform, 2)
PndMdtPointsToWaveform & operator=(const PndMdtPointsToWaveform &)
virtual void Exec(Option_t *opt)
bool operator<(const key &rhs) const
key(Int_t _tid, Int_t _detid)