PandaRoot
CbmPlane.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 #ifndef CBMPlane_H
14 #define CBMPlane_H
15 
16 #include "TClonesArray.h"
17 //#include "TVector3.h"
18 #include "TLorentzVector.h"
19 #include "FairDetector.h"
20 
21 class TClonesArray;
22 // class CbmPlaneImPlanePoint;
23 class CbmPlanePoint;
24 class FairVolume;
25 
26 class CbmPlane : public FairDetector {
27 
28  public:
30  CbmPlane();
31 
36  CbmPlane(const char *name, Bool_t active);
37 
39  virtual ~CbmPlane();
40 
44  virtual void Initialize();
45 
53  virtual Bool_t ProcessHits(FairVolume *vol = 0);
54 
60  virtual void EndOfEvent();
61 
62  virtual void BeginEvent();
67  virtual void Register();
68 
70  virtual TClonesArray *GetCollection(Int_t iColl) const;
71 
76  virtual void Print() const;
77 
82  virtual void Reset();
83 
91  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
92 
96  virtual void ConstructGeometry();
97 
98  /* CbmPlanePoint* AddHit(Int_t trackID, Int_t detID, TVector3 posIn, */
99  /* TVector3 pos_out, TVector3 momIn, */
100  /* TVector3 momOut, Double_t time, */
101  /* Double_t length, Double_t eLoss); */
102 
103  CbmPlanePoint *AddHit1(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss,
104  Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt);
105 
106  CbmPlanePoint *AddHit2(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss,
107  Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt);
108 
109  CbmPlanePoint *AddHit3(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss,
110  Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt);
111 
112  void plane();
113 
114  private:
115  Int_t fTrackID;
116  Int_t fVolumeID;
117  TLorentzVector fPosIn, fPosOut;
118  TLorentzVector fMomIn, fMomOut;
119  Double32_t fTime;
120  Double32_t fLength;
121  Double32_t fELoss;
122  Int_t fPosIndex;
123  Int_t volDetector;
124  Double_t fcharge;
125  Double_t fmass;
126  Bool_t fpreflag, fpostflag;
127 
128  TString fcurrnam;
129  TString fcurrnam2;
130 
131  TClonesArray *fPlane1Collection;
132  TClonesArray *fPlane2Collection;
133  TClonesArray *fPlane3Collection;
134 
135  Int_t fevent;
136  // reset all parameters
137  void ResetParameters();
138 
139  ClassDef(CbmPlane, 1)
140 };
141 
142 inline void CbmPlane::ResetParameters()
143 {
144  fTrackID = -999;
145  fVolumeID = -999;
146  fPosIn.SetXYZT(-999., -999., -999., -999.);
147  fPosOut.SetXYZT(-999., -999., -999., -999.);
148  fMomIn.SetXYZT(-999., -999., -999., -999.);
149  fMomOut.SetXYZT(-999., -999., -999., -999.);
150  fTime = -999;
151  fLength = -999;
152  fELoss = 0;
153  fmass = -999;
154  fpreflag = -999;
155  fpostflag = -999;
156 }
157 
158 #endif
virtual void EndOfEvent()
virtual void ConstructGeometry()
void plane()
virtual void Initialize()
virtual void Reset()
virtual Bool_t ProcessHits(FairVolume *vol=0)
CbmPlanePoint * AddHit2(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt)
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Print() const
CbmPlanePoint * AddHit1(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt)
virtual void Register()
CbmPlanePoint * AddHit3(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt)
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual ~CbmPlane()
virtual void BeginEvent()