Add some charmed and bottom baryons to the particle list (TDatabasePDG). This
[u/mrichter/AliRoot.git] / MUON / AliMUONChamberTrigger.cxx
CommitLineData
a9e2aefa 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
39f5a0e6 18Revision 1.3 2000/06/28 15:16:35 morsch
19(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
20to allow development of slat-muon chamber simulation and reconstruction code in the MUON
21framework. The changes should have no side effects (mostly dummy arguments).
22(2) Hit disintegration uses 3-dim hit coordinates to allow simulation
23of chambers with overlapping modules (MakePadHits, Disintegration).
24
802a864d 25Revision 1.2 2000/06/15 07:58:48 morsch
26Code from MUON-dev joined
27
a9e2aefa 28Revision 1.1.2.3 2000/06/09 21:27:35 morsch
29Most coding rule violations corrected.
30
31Revision 1.1.2.2 2000/04/26 12:28:25 morsch
32- flag pad hits with condition on ToF (CP)
33- Tof included in the method DisIntegration (CP)
34
35Revision 1.1.2.1 2000/02/17 14:30:54 morsch
36Draft version
37
38*/
39
40#include "AliMUONChamberTrigger.h"
41#include "AliMUONSegmentationTrigger.h"
42#include "AliMUONResponseTrigger.h"
43#include <TObjArray.h>
44#include <TMath.h>
45#include <iostream.h>
46
47ClassImp(AliMUONChamberTrigger)
48
49//-------------------------------------------
50AliMUONChamberTrigger::AliMUONChamberTrigger() : AliMUONChamber()
51{
52// Default Constructor
53}
54
55//-------------------------------------------
56void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
802a864d 57 Float_t xhit, Float_t yhit, Float_t zhit,
a9e2aefa 58 Int_t& nnew,
59 Float_t newclust[6][500])
60{
61//
62// Generates pad hits (simulated cluster)
63// using the segmentation and the response model
64
65 Int_t twentyNano;
39f5a0e6 66 if (tof<75*TMath::Power(10,-9)) {
a9e2aefa 67 twentyNano=1;
68 } else {
69 twentyNano=100;
70 }
71
72 // cout << " time = " << tof << " , " << twentyNano << "\n";
73
74 Float_t qp;
75 nnew=0;
76 for (Int_t i=1; i<=fnsec; i++) {
77 AliMUONSegmentation * segmentation=
78 (AliMUONSegmentation*) (*fSegmentation)[i-1];
79
80// Find the module & strip Id. which has fired
81 Int_t ix,iy;
82
802a864d 83 segmentation->GetPadIxy(xhit,yhit,0,ix,iy);
a9e2aefa 84 segmentation->SetPad(ix,iy);
85
86// treatment of GEANT hits w/o corresponding strip (due to the fact that
87// the 2 geometries are computed in a very slightly different way)
88 if (ix==0&&iy==0) {
89 cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n";
90 } else {
91 // --- store signal information for this strip
92 newclust[0][nnew]=1.; // total charge
93 newclust[1][nnew]=ix; // ix-position of pad
94 newclust[2][nnew]=iy; // iy-position of pad
95 newclust[3][nnew]=twentyNano; // time of flight
96 newclust[4][nnew]=segmentation->ISector(); // sector id
97 newclust[5][nnew]=(Float_t) i; // counter
98 nnew++;
99 // set hits
802a864d 100 segmentation->SetHit(xhit,yhit,zhit);
a9e2aefa 101 // get the list of nearest neighbours
102 Int_t nList, xList[2], yList[2];
103 segmentation->Neighbours(ix,iy,&nList,xList,yList);
104
105 for (Int_t j=0; j<nList; j++){
106
107 // neighbour real coordinates (just for checks here)
802a864d 108 Float_t x,y,z;
109 segmentation->GetPadCxy(xList[j],yList[j],x,y,z);
a9e2aefa 110 // set pad (fx fy & fix fiy are the current pad coord. & Id.)
111 segmentation->SetPad(xList[j],yList[j]);
112 // get the chamber (i.e. current strip) response
113 qp=fResponse->IntXY(segmentation);
114
115 if (qp > 0.5) {
116 // --- store signal information for neighbours
117 newclust[0][nnew]=qp; // total charge
118 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
119 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
120 newclust[3][nnew]=twentyNano; // time of flight
121 newclust[4][nnew]=segmentation->ISector(); // sector id
122 newclust[5][nnew]=(Float_t) i; // counter
123 nnew++;
124 } // qp > 0.5
125 } // loop on neighbour
126 } // endif hit w/o strip
127 } // loop over planes
128}
129
130
131
132
133
134
135
136