removed rule for dummy arguments; added rule for virtual member functions (no.5)
[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$
802a864d 18Revision 1.2 2000/06/15 07:58:48 morsch
19Code from MUON-dev joined
20
a9e2aefa 21Revision 1.1.2.3 2000/06/09 21:27:35 morsch
22Most coding rule violations corrected.
23
24Revision 1.1.2.2 2000/04/26 12:28:25 morsch
25- flag pad hits with condition on ToF (CP)
26- Tof included in the method DisIntegration (CP)
27
28Revision 1.1.2.1 2000/02/17 14:30:54 morsch
29Draft version
30
31*/
32
33#include "AliMUONChamberTrigger.h"
34#include "AliMUONSegmentationTrigger.h"
35#include "AliMUONResponseTrigger.h"
36#include <TObjArray.h>
37#include <TMath.h>
38#include <iostream.h>
39
40ClassImp(AliMUONChamberTrigger)
41
42//-------------------------------------------
43AliMUONChamberTrigger::AliMUONChamberTrigger() : AliMUONChamber()
44{
45// Default Constructor
46}
47
48//-------------------------------------------
49void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
802a864d 50 Float_t xhit, Float_t yhit, Float_t zhit,
a9e2aefa 51 Int_t& nnew,
52 Float_t newclust[6][500])
53{
54//
55// Generates pad hits (simulated cluster)
56// using the segmentation and the response model
57
58 Int_t twentyNano;
59 if (tof<75*pow(10,-9)) {
60 twentyNano=1;
61 } else {
62 twentyNano=100;
63 }
64
65 // cout << " time = " << tof << " , " << twentyNano << "\n";
66
67 Float_t qp;
68 nnew=0;
69 for (Int_t i=1; i<=fnsec; i++) {
70 AliMUONSegmentation * segmentation=
71 (AliMUONSegmentation*) (*fSegmentation)[i-1];
72
73// Find the module & strip Id. which has fired
74 Int_t ix,iy;
75
802a864d 76 segmentation->GetPadIxy(xhit,yhit,0,ix,iy);
a9e2aefa 77 segmentation->SetPad(ix,iy);
78
79// treatment of GEANT hits w/o corresponding strip (due to the fact that
80// the 2 geometries are computed in a very slightly different way)
81 if (ix==0&&iy==0) {
82 cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n";
83 } else {
84 // --- store signal information for this strip
85 newclust[0][nnew]=1.; // total charge
86 newclust[1][nnew]=ix; // ix-position of pad
87 newclust[2][nnew]=iy; // iy-position of pad
88 newclust[3][nnew]=twentyNano; // time of flight
89 newclust[4][nnew]=segmentation->ISector(); // sector id
90 newclust[5][nnew]=(Float_t) i; // counter
91 nnew++;
92 // set hits
802a864d 93 segmentation->SetHit(xhit,yhit,zhit);
a9e2aefa 94 // get the list of nearest neighbours
95 Int_t nList, xList[2], yList[2];
96 segmentation->Neighbours(ix,iy,&nList,xList,yList);
97
98 for (Int_t j=0; j<nList; j++){
99
100 // neighbour real coordinates (just for checks here)
802a864d 101 Float_t x,y,z;
102 segmentation->GetPadCxy(xList[j],yList[j],x,y,z);
a9e2aefa 103 // set pad (fx fy & fix fiy are the current pad coord. & Id.)
104 segmentation->SetPad(xList[j],yList[j]);
105 // get the chamber (i.e. current strip) response
106 qp=fResponse->IntXY(segmentation);
107
108 if (qp > 0.5) {
109 // --- store signal information for neighbours
110 newclust[0][nnew]=qp; // total charge
111 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
112 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
113 newclust[3][nnew]=twentyNano; // time of flight
114 newclust[4][nnew]=segmentation->ISector(); // sector id
115 newclust[5][nnew]=(Float_t) i; // counter
116 nnew++;
117 } // qp > 0.5
118 } // loop on neighbour
119 } // endif hit w/o strip
120 } // loop over planes
121}
122
123
124
125
126
127
128
129