FairRoot/PandaRoot
PndEmcFWEndcapDigi.h
Go to the documentation of this file.
1 //#pragma once
2 
3 #ifndef PNDEMCFWENDCAPDIGI_H_
4 #define PNDEMCFWENDCAPDIGI_H_
5 
6 #include <PndPersistencyTask.h>
11 
12 #include <string>
13 //#include <vector>
14 
15 class PndEmcHit;
17 class PndEmcWaveform;
18 
19 class TClonesArray;
21 class PndEmcRecoPar;
22 class PndEmcGeoPar;
23 class PndEmcAbsPSA;
25 
35 {
36 public:
37  // Constructors
38  PndEmcFWEndcapDigi(Int_t verbose=0, Bool_t storedigis=kTRUE);
39  // Destructor
40  virtual ~PndEmcFWEndcapDigi();
41 
42  virtual InitStatus Init();
43  virtual void Exec(Option_t* opt);
44 
45  void SetStorageOfData(Bool_t val); // Method to specify whether digis are stored or not.
46  void RunTimeBased(){fTimeOrderedDigi = kTRUE;};
47 
48  void SetPSAAlgorithms(PndEmcAbsPSA* highgain, PndEmcAbsPSA* lowgain) {
49  fHighgainPSA = dynamic_cast<PndEmcPSAFPGASampleAnalyser*>(highgain);
50  fLowgainPSA = dynamic_cast<PndEmcPSAFPGASampleAnalyser*>(lowgain);
51 
52  if(fHighgainPSA==NULL || fLowgainPSA==NULL) {
53  std::cerr << "-E- in PndEmcFWEndcapDigi::SetPSAAlgorithms: PSA must be a PndEmcPSAFPGASampleAnalyser. External PSA setting has no effect" << std::endl;
54  }
55  }
56 
58  fCalibrator = dynamic_cast<PndEmcSimCrystalCalibrator*>(Cal);
59  if(fCalibrator==NULL) {
60  std::cerr << "-E- in PndEmcFWEndcapDigi::SetCrystalCalibrator: Calibrator must be a PndEmcSimCrystalCalibrator. External Calibrator setting has no effect" << std::endl;
61  }
62  };
63 protected:
65  virtual void SetParContainers();
66 private:
67  // don't allow copying (-Weffc++)
68  PndEmcFWEndcapDigi(const PndEmcFWEndcapDigi&); // no implementation
69  PndEmcFWEndcapDigi& operator= (const PndEmcFWEndcapDigi&); // no implementation
70 
71 private:
72 
74  TClonesArray* fWaveformArray;
75 
77  TClonesArray* fDigiArray;
78 
80  TString fDigiPosMethod; //"surface" or "depth"
84 
88 
90 
94 
96  Int_t fVerbose;
97 
99 
101 };
102 
103 #endif
virtual void Exec(Option_t *opt)
Runs the task.
virtual InitStatus Init()
Init Task.
void SetPSAAlgorithms(PndEmcAbsPSA *highgain, PndEmcAbsPSA *lowgain)
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
#define verbose
Wrapping class to manage two independent PSAs for high, resp. low gain.
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcFWEndcapDigi(Int_t verbose=0, Bool_t storedigis=kTRUE)
Task to create digis from waveforms.
PndEmcFWEndcapDigiPar * fDigiPar
Digitisation parameter container.
virtual void SetParContainers()
parameter set for the FWEndcap variant of waveform simulation
PndEmcPSAFPGASampleAnalyser * fLowgainPSA
Double_t
Double_t fEmcDigiPositionDepthShashlyk
virtual void SetCrystalCalibrator(PndEmcAbsCrystalCalibrator *Cal)
PndEmcHighLowPSA fHighLowPSA
Class to simulate a Calibration.
TClonesArray * fWaveformArray
represents a simulated waveform in an emc crystal
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: PndEmcAbsPSA.h:21
represents the deposited energy of one emc crystal from simulation
Definition: PndEmcHit.h:26
Double_t fEmcDigiPositionDepthPWO
pulseshape interface
PndEmcRecoPar * fRecoPar
Reconstruction parameter container.
Abstract interface for a emc calibrator.
ClassDef(PndEmcFWEndcapDigi, 1)
PndEmcPSAFPGASampleAnalyser * fHighgainPSA
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:12
TClonesArray * fDigiArray
PndEmcSimCrystalCalibrator * fCalibrator
void SetStorageOfData(Bool_t val)
PndEmcGeoPar * fGeoPar
Digitisation parameter container.
PndEmcFWEndcapDigi & operator=(const PndEmcFWEndcapDigi &)
Bool_t fTimeOrderedDigi
set to kTRUE to use the time ordering of the output data.