KaliVeda
Toolkit for HIC analysis
KVElasticScatterEvent.h
1 /*
2 $Id: KVElasticScatterEvent.h,v 1.3 2009/01/14 15:35:50 ebonnet Exp $
3 $Revision: 1.3 $
4 $Date: 2009/01/14 15:35:50 $
5 */
6 
9 
10 #ifndef __KVELASTICSCATTEREVENT_H
11 #define __KVELASTICSCATTEREVENT_H
12 
13 #include "KVString.h"
14 #include "TVector3.h"
15 #include "KVTarget.h"
16 #include "KVLayer.h"
17 #include "KVMaterial.h"
18 #include "KVNucleus.h"
19 #include "KVSimEvent.h"
20 #include "KV2Body.h"
21 #include "KVMultiDetArray.h"
22 #include "KVReconstructedNucleus.h"
23 #include "KVReconstructedEvent.h"
24 #include "TObject.h"
25 #include "TTree.h"
26 #include "KVHashList.h"
27 #include "KVBase.h"
28 #include "KVDBSystem.h"
29 #include "KVPosition.h"
30 #include "KVParticle.h"
31 
72 
82 class KVElasticScatterEvent : public KVBase {
83 
84 protected:
92 
95 
100 
107  /*
108  Bool_t SecondTurn;
109  Double_t Ekdiff_ST;
110  Double_t Thdiff_ST;
111  Double_t Phdiff_ST;
112  */
113  void init();
114  void GenereKV2Body();
116  void PropagateInTargetLayer();
118  void StartEvents();
119  virtual void MakeDiffusion();
120  void SortieDeCible();
121 
122 public:
123 
124  enum {
125  kProjIsSet = BIT(14), //kTRUE if projectile nucleus defined
126  kTargIsSet = BIT(15), //kTRUE if target nucleus defined
127  kHasTarget = BIT(16), //kTRUE if target material defined
128  kIsUpdated = BIT(17), //flag indicating if ValidateEntrance method has to be called
129  kIsDetectionOn = BIT(18) //flag indicating if user asked detection of events
130  };
131 
133  {
134  return TestBit(kProjIsSet);
135  }
137  {
138  return TestBit(kTargIsSet);
139  }
141  {
142  return TestBit(kHasTarget);
143  }
145  {
146  return TestBit(kIsUpdated);
147  }
149  {
150  return TestBit(kIsDetectionOn);
151  }
152 
153  void ChooseKinSol(Int_t choix = 1);
154 
156  virtual ~KVElasticScatterEvent();
157 
158  virtual void SetSystem(KVDBSystem* sys);
159  virtual void SetSystem(Int_t zp, Int_t ap, Double_t ekin, Int_t zt, Int_t at);
160  virtual void SetTargNucleus(KVNucleus* nuc);
161  virtual void SetProjNucleus(KVNucleus* nuc);
162 
163  void SetDetectionOn(Bool_t On = kTRUE);
164 
165 
166  KVNucleus* GetNucleus(const Char_t* name) const;
167  KVNucleus* GetNucleus(Int_t ii) const;
168 
169  virtual void SetTargetMaterial(KVTarget* targ, Bool_t IsRandomized = kTRUE);
170  KVTarget* GetTarget() const;
171 
173 
175  {
176  return GetReconstructedEvent()->GetParticleWithName(nucname);
177  }
179  {
180  return rec_evt;
181  }
182  KVEvent* GetSimEvent(void) const
183  {
184  return sim_evt;
185  }
186 
187  virtual void Reset();
188  virtual Bool_t ValidateEntrance();
189 
190  void SetDiffNucleus(KVString name = "PROJ");
191  void SetRandomOption(Option_t* opt = "isotropic");
192  Bool_t IsIsotropic() const;
193 
194  virtual void Process(Int_t ntimes = 1, Bool_t reset = kTRUE);
195 
196  virtual void SetAnglesForDiffusion(Double_t theta, Double_t phi);
197  virtual void Filter();
198  virtual void TreateEvent();
199 
200  virtual void DefineAngularRange(TObject*);
201  void DefineAngularRange(Double_t tmin, Double_t tmax, Double_t pmin, Double_t pmax);
202  Double_t GetTheta(KVString opt) const;
203  Double_t GetPhi(KVString opt)const;
204 
206  {
207  return kb2;
208  }
209  void Print(Option_t* /*opt*/ = "") const;
210 
211  virtual void ClearTrees();
212  virtual void ResetTrees();
213  virtual void DefineTrees();
214  KVHashList* GetTrees() const;
215 
216  virtual void ClearHistos();
217  virtual void DefineHistos();
218  virtual void ResetHistos();
219  KVHashList* GetHistos() const;
220 
221  ClassDef(KVElasticScatterEvent, 1) //simulate ElasticScatterEvent and answer of a given (multi-)detector
222 };
223 
224 #endif
int Int_t
bool Bool_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
Relativistic binary kinematics calculator.
Definition: KV2Body.h:166
Base class for KaliVeda framework.
Definition: KVBase.h:142
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:52
simulate ElasticScatterEvent and answer of a given (multi-)detector : A + B -> A + B
virtual void SetProjNucleus(KVNucleus *nuc)
Define new projectile nucleus.
virtual void SetSystem(KVDBSystem *sys)
KVHashList * ltree
to store tree
virtual TVector3 & GetInteractionPointInTargetLayer()
return the last interaction point in the target
void Print(Option_t *="") const
virtual void ClearTrees()
Efface la liste des arbres et leur contenu et met le pointeur a zero.
virtual void DefineAngularRange(TObject *)
void SetDiffNucleus(KVString name="PROJ")
virtual void SetTargNucleus(KVNucleus *nuc)
Define new target nucleus.
Bool_t IsIsotropic() const
retoune kTRUE si l'option choisi est isotrope
virtual void SetAnglesForDiffusion(Double_t theta, Double_t phi)
void SetRandomOption(Option_t *opt="isotropic")
KVReconstructedNucleus * GetReconstructedNucleus(KVString nucname)
KVHashList * GetTrees() const
return the list where histo are stored
KVTarget * GetTarget() const
return the current target material
virtual void Process(Int_t ntimes=1, Bool_t reset=kTRUE)
virtual void ClearHistos()
Efface la liste des histo et leur contenu et met le pointeur a zero.
KVElasticScatterEvent()
Default constructor.
virtual void ResetHistos()
Reset histo in the list.
virtual void SetTargetMaterial(KVTarget *targ, Bool_t IsRandomized=kTRUE)
KVReconstructedEvent * rec_evt
void SetDetectionOn(Bool_t On=kTRUE)
KVEvent * GetSimEvent(void) const
KVHashList * GetHistos() const
return the list where histo are stored
Int_t kTreatedNevts
number of diffusion performed
virtual ~KVElasticScatterEvent()
Destructor.
virtual void Reset()
Set contents/entries to zero for predifined histograms, trees.
KVReconstructedEvent * GetReconstructedEvent(void) const
KVHashList * lhisto
to store control histogram
KVNucleus * GetNucleus(const Char_t *name) const
return the current projectile ("PROJ") or the target ("TARG") nucleus
void ChooseKinSol(Int_t choix=1)
Bool_t DefineTargetNucleusFromLayer(KVString layer_name="")
Double_t GetPhi(KVString opt) const
Double_t GetTheta(KVString opt) const
Abstract base class container for multi-particle events.
Definition: KVEvent.h:67
Extended version of ROOT THashList.
Definition: KVHashList.h:29
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:91
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Nuclei reconstructed from data measured by a detector array .
Container class for simulated nuclei, KVSimNucleus.
Definition: KVSimEvent.h:22
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:127
Particle * GetParticleWithName(const Char_t *name) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const