PandaRoot
PndEmc.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 // ----- PndEmc header file -----
15 // ----- Created 14/08/06 by S.Spataro -----
16 // -------------------------------------------------------------------------
17 //#pragma once
18 #ifndef PNDEMC_H
19 #define PNDEMC_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 PndEmcPoint;
29 class FairVolume;
30 class TGeoNode;
31 
37 class PndEmc : public FairDetector {
38  public:
40  PndEmc();
41 
46  PndEmc(const char *name, Bool_t active, Bool_t fast = kFALSE, Bool_t storepnts = kTRUE);
47 
49  virtual ~PndEmc();
50 
54  virtual void Initialize();
55 
63  virtual Bool_t ProcessHits(FairVolume *vol = 0);
64 
70  virtual void EndOfEvent();
71 
72  virtual void BeginEvent();
77  virtual void Register();
78 
80  virtual TClonesArray *GetCollection(Int_t iColl) const;
81 
86  virtual void Print() const;
87 
92  virtual void Reset();
93 
101  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
102 
106  virtual void ConstructGeometry();
107 
108  // construct detector from .dat file
109  void ConstructASCIIGeometry();
110 
111  // construct detector from .root file
112  void ConstructRootGeometry();
113 
114  // construct detector -Barrel- from .root file
115  void ConstructRootGeomMod12();
116 
117  // construct detector -BwEndCap- from .root file
118  void ConstructRootGeomMod4();
119 
120  // construct detector -Fsc- from .root file
121  void ConstructRootGeomMod5();
122 
123  // recursively add volumes to the geoManager
124  void ExpandNode(TGeoVolume *fVol, TGeoVolume *Cave);
125 
126  // virtual Bool_t CheckIfSensitive(std::string name);
127 
128  // general function for chosing the combination of EMC geometry
129  virtual void SetGeometryVersion(const Int_t GeoNumber);
130  //
131  virtual void SetGeometryFileNameDouble(TString fname, TString fname2, Int_t fwbwchoice = 0, TString geoVer = "0");
132  //
133  virtual void SetGeometryFileNameTriple(TString fname, TString fname2, TString fname3, TString geoVer = "0");
134 
135  virtual void SetGeometryFileNameQuadruple(TString fname, TString fname2, TString fname3, TString fname4, TString geoVer = "0");
136 
137  PndEmcPoint *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,
138  Short_t copy, Bool_t enterning, Bool_t exiting);
139 
140  void SetStorageOfData(Bool_t val); // Method to specify whether points are stored or not.
141 
142  // replaces G3 initialisation via g3Config.C
143  virtual void SetSpecialPhysicsCuts();
144 
145  private:
146  Int_t fTrackID;
147  Int_t fVolumeID;
148  Int_t fEventID;
149  TLorentzVector fPos;
150  TLorentzVector fMom;
151  Double32_t fTime;
152  Double32_t fLength;
153  Double32_t fELoss;
154  Int_t fPosIndex;
155  TClonesArray *fEmcCollection;
156  // Int_t volDetector; //! MC volume ID of MUO
157  Bool_t bIsFastFsc;
158  Bool_t fStoreData; // Flag which specify whether points are stored or not
159  Bool_t fwendcap;
160  Bool_t bwendcap;
161 
162  TString fgeoName2;
163  TString fgeoName3;
164  TString fgeoName4;
165 
166  Int_t MapperVersion;
167 
168  // reset all parameters
169  void ResetParameters();
170 
171  PndEmc(const PndEmc &L);
172  PndEmc &operator=(const PndEmc &) { return *this; };
173 
174  ClassDef(PndEmc, 1)
175 };
176 
177 #endif
represents a mc hit in an emc crystal
Definition: PndEmcPoint.h:31
virtual void SetGeometryVersion(const Int_t GeoNumber)
void ConstructRootGeomMod4()
void ConstructRootGeometry()
virtual void ConstructGeometry()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void Reset()
virtual void SetGeometryFileNameQuadruple(TString fname, TString fname2, TString fname3, TString fname4, TString geoVer="0")
void SetStorageOfData(Bool_t val)
virtual void Register()
Simulation of EMC.
Definition: PndEmc.h:37
void ConstructRootGeomMod5()
void ExpandNode(TGeoVolume *fVol, TGeoVolume *Cave)
virtual void Initialize()
virtual void SetSpecialPhysicsCuts()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Print() const
void ConstructRootGeomMod12()
void ConstructASCIIGeometry()
PndEmcPoint * 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, Bool_t enterning, Bool_t exiting)
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void BeginEvent()
virtual void SetGeometryFileNameDouble(TString fname, TString fname2, Int_t fwbwchoice=0, TString geoVer="0")
virtual void EndOfEvent()
virtual void SetGeometryFileNameTriple(TString fname, TString fname2, TString fname3, TString geoVer="0")
virtual ~PndEmc()