]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONResponseTriggerV1.cxx
Adding MuonSim.SetMakeTrigger(MUON); now required by the new CTP framework (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseTriggerV1.cxx
CommitLineData
e087fe7f 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
30178c30 16/* $Id$ */
e087fe7f 17
d1525c79 18// ------------------
19// Class AliMUONTriggerResponseV1
20// ------------------
21// Trigger chamber response
22// with cluster size activated
23
30178c30 24#include <TMath.h>
25#include <TRandom.h>
e087fe7f 26
27#include "AliMUONResponseTriggerV1.h"
337c9041 28#include "AliMUONGeometrySegmentation.h"
e087fe7f 29
30ClassImp(AliMUONResponseTriggerV1)
31
32//------------------------------------------------------------------
30178c30 33AliMUONResponseTriggerV1::AliMUONResponseTriggerV1()
34 : AliMUONResponseTrigger()
35{
e087fe7f 36// default constructor
37 Float_t hv=9.2;
38 SetParameters(hv);
39}
40
41//------------------------------------------------------------------
30178c30 42AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(Float_t hv)
43 : AliMUONResponseTrigger()
44{
e087fe7f 45// Constructor
46 SetParameters(hv);
47}
48
49//------------------------------------------------------------------
50void AliMUONResponseTriggerV1::SetParameters(Float_t hv){
51// initialize parameters accoring to HV
52// (see V.Barret B.Espagnon and P.Rosnet Alice/note xxx)
53 fA = 6.089 * hv - 52.70;
54 fB = 2.966;
55 fC = 4.3e-4 * hv - 3.5e-3;
56}
57
58//------------------------------------------------------------------
59Int_t AliMUONResponseTriggerV1::SetGenerCluster(){
60// Set the GenerCluster parameter and return 1
61 fGenerCluster = gRandom->Rndm();
62 return 1;
63}
64
337c9041 65//------------------------------------------------------------------
85fec35d 66Float_t AliMUONResponseTriggerV1::IntXY(Int_t idDE, AliMUONGeometrySegmentation * segmentation) const
67{
337c9041 68// Returns 1 or 0 if the current strip is fired or not
69// get the "parameters" needed to evaluate the strip response
70// x1 : hit x(y) position
71// x2 : x(y) coordinate of the main strip
72// x3 : current strip real x(y) coordinate
73// x4 : dist. between x(y) hit pos. and the closest border of the current strip
74
75 Float_t x1,x2,x3,x4;
76 segmentation->IntegrationLimits(idDE, x1,x2,x3,x4);
77 Float_t theta = 0.; // incident angle to be implemented
78
79 return (fGenerCluster < FireStripProb(x4,theta)) ? 1:0;
80}
e087fe7f 81
82//------------------------------------------------------------------
85fec35d 83Float_t AliMUONResponseTriggerV1::FireStripProb(Float_t x4, Float_t theta)
84const
85{
e087fe7f 86// parametrisation of the probability that a strip neighbour of the main
87// strip is fired (V.Barret B.Espagnon and P.Rosnet Alice/note xxx)
88// WARNING : need to convert x4 from cm to mm
89
90 return
91 (TMath::Cos(theta)*fA/(fA+TMath::Cos(theta)*TMath::Power(x4*10.,fB))+fC)/
92 (TMath::Cos(theta)+fC);
93}
94