From e087fe7f2c0f9b00d84f16d5735ae7afa8c5ad32 Mon Sep 17 00:00:00 2001 From: pcrochet Date: Mon, 20 Nov 2000 21:47:58 +0000 Subject: [PATCH] new class : parametrization of the cluster-size for RPC chambers --- MUON/AliMUONResponseTriggerV1.cxx | 83 +++++++++++++++++++++++++++++++ MUON/AliMUONResponseTriggerV1.h | 48 ++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 MUON/AliMUONResponseTriggerV1.cxx create mode 100644 MUON/AliMUONResponseTriggerV1.h diff --git a/MUON/AliMUONResponseTriggerV1.cxx b/MUON/AliMUONResponseTriggerV1.cxx new file mode 100644 index 00000000000..127ea8f69a8 --- /dev/null +++ b/MUON/AliMUONResponseTriggerV1.cxx @@ -0,0 +1,83 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* + +*/ + +#include "AliMUONResponseTriggerV1.h" +#include "AliSegmentation.h" +#include +#include +#include + +ClassImp(AliMUONResponseTriggerV1) + +//------------------------------------------------------------------ +AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(){ +// default constructor + Float_t hv=9.2; + SetParameters(hv); +} + +//------------------------------------------------------------------ +AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(Float_t hv){ +// Constructor + SetParameters(hv); +} + +//------------------------------------------------------------------ +void AliMUONResponseTriggerV1::SetParameters(Float_t hv){ +// initialize parameters accoring to HV +// (see V.Barret B.Espagnon and P.Rosnet Alice/note xxx) + fA = 6.089 * hv - 52.70; + fB = 2.966; + fC = 4.3e-4 * hv - 3.5e-3; +} + +//------------------------------------------------------------------ +Int_t AliMUONResponseTriggerV1::SetGenerCluster(){ +// Set the GenerCluster parameter and return 1 + fGenerCluster = gRandom->Rndm(); + return 1; +} + +//------------------------------------------------------------------ +Float_t AliMUONResponseTriggerV1::IntXY(AliSegmentation * segmentation){ +// Returns 1 or 0 if the current strip is fired or not +// get the "parameters" needed to evaluate the strip response +// x1 : hit x(y) position +// x2 : x(y) coordinate of the main strip +// x3 : current strip real x(y) coordinate +// x4 : dist. between x(y) hit pos. and the closest border of the current strip + + Float_t x1,x2,x3,x4; + segmentation->IntegrationLimits(x1,x2,x3,x4); + Float_t theta = 0.; // incident angle to be implemented + + return (fGenerCluster < FireStripProb(x4,theta)) ? 1:0; +} + +//------------------------------------------------------------------ +Float_t AliMUONResponseTriggerV1::FireStripProb(Float_t x4, Float_t theta){ +// parametrisation of the probability that a strip neighbour of the main +// strip is fired (V.Barret B.Espagnon and P.Rosnet Alice/note xxx) +// WARNING : need to convert x4 from cm to mm + + return + (TMath::Cos(theta)*fA/(fA+TMath::Cos(theta)*TMath::Power(x4*10.,fB))+fC)/ + (TMath::Cos(theta)+fC); +} + diff --git a/MUON/AliMUONResponseTriggerV1.h b/MUON/AliMUONResponseTriggerV1.h new file mode 100644 index 00000000000..15011f0336e --- /dev/null +++ b/MUON/AliMUONResponseTriggerV1.h @@ -0,0 +1,48 @@ +#ifndef ALIMUONRESPONSETRIGGERV1_H +#define ALIMUONRESPONSETRIGGERV1_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +#include "AliMUONResponseTrigger.h" + +class AliMUONResponseTriggerV1 : +public AliMUONResponseTrigger { +public: + // default constructor + AliMUONResponseTriggerV1(); + AliMUONResponseTriggerV1(Float_t hv); + virtual ~AliMUONResponseTriggerV1(){} + // Charge disintegration + virtual Float_t IntXY(AliSegmentation * segmentation); + + // Set the GenerCluster parameter + virtual Int_t SetGenerCluster(); + + private: + // initialize parameters + void SetParameters(Float_t hv); + // parametrization of the cluster-size + Float_t FireStripProb(Float_t x4, Float_t theta); + + ClassDef(AliMUONResponseTriggerV1,1) // Implementation of RPC response + + protected: + Float_t fGenerCluster; // Random number + Float_t fA; // first parameter of the cluster-size param + Float_t fB; // second parameter of the cluster-size param + Float_t fC; // third parameter of the cluster-size param +}; +#endif + + + + + + + + + + + + + -- 2.43.0