PandaRoot
PndEmcApd.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndEmcApd header file -----
15 // ----- Created 07/04/08 by S.Spataro -----
16 // -------------------------------------------------------------------------
17 //#pragma once
18 #ifndef PNDEMCAPD_H
19 #define PNDEMCAPD_H
20 
21 #include "TClonesArray.h"
22 #include "TVector3.h"
23 #include "TString.h"
24 #include "TLorentzVector.h"
25 #include "FairDetector.h"
26 
27 class TClonesArray;
28 class PndEmcApdPoint;
29 class FairVolume;
30 
31 class PndEmcApd : public FairDetector {
32 
33  public:
35  PndEmcApd();
36 
41  PndEmcApd(const char *name, Bool_t active);
42 
44  virtual ~PndEmcApd();
45 
49  virtual void Initialize();
50 
58  virtual Bool_t ProcessHits(FairVolume *vol = 0);
59 
65  virtual void EndOfEvent();
66 
67  virtual void BeginEvent();
72  virtual void Register();
73 
75  virtual TClonesArray *GetCollection(Int_t iColl) const;
76 
81  virtual void Print() const;
82 
87  virtual void Reset();
88 
96  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
97 
101  virtual void ConstructGeometry();
102 
103  // construct detector from .dat file
104  void ConstructASCIIGeometry();
105 
106  PndEmcApdPoint *AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys,
107  Short_t copy, Short_t flag);
108 
109  private:
110  Int_t fTrackID;
111  Int_t fVolumeID;
112  Int_t fEventID;
113  TLorentzVector fPos;
114  TLorentzVector fMom;
115  Double32_t fTime;
116  Double32_t fLength;
117  Double32_t fELoss;
118  Int_t fPosIndex;
119 
120  TClonesArray *fApdCollection;
121 
122  // reset all parameters
123  void ResetParameters();
124 
125  PndEmcApd(const PndEmcApd &L);
126  PndEmcApd &operator=(const PndEmcApd &) { return *this; }
127 
128  ClassDef(PndEmcApd, 1)
129 };
130 
131 #endif
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Initialize()
virtual void Reset()
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void BeginEvent()
virtual void ConstructGeometry()
virtual Bool_t ProcessHits(FairVolume *vol=0)
PndEmcApdPoint * AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys, Short_t copy, Short_t flag)
virtual void EndOfEvent()
void ConstructASCIIGeometry()
virtual ~PndEmcApd()
virtual void Register()
virtual void Print() const