]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONResponseTrigger.cxx
Removing, as not used anymore (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseTrigger.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
88cb7938 16/* $Id$ */
a9e2aefa 17
9265505b 18// -------------------------------
19// Class AliMUONResponseTrigger
20// -------------------------------
21// Implementation
22// of RPC response
30178c30 23
a9e2aefa 24
9265505b 25#include "AliMUONResponseTrigger.h"
885d501b 26#include "AliMUON.h"
27#include "AliMUONDigit.h"
28#include "AliMUONGeometryTransformer.h"
29#include "AliMUONHit.h"
9265505b 30#include "AliMUONConstants.h"
31
885d501b 32#include "AliMpPad.h"
866c3232 33#include "AliMpCathodType.h"
885d501b 34#include "AliMpPlaneType.h"
9265505b 35#include "AliMpSegmentation.h"
885d501b 36#include "AliMpVSegmentation.h"
9265505b 37
885d501b 38#include "AliRun.h"
9265505b 39#include "AliLog.h"
885d501b 40#include "TList.h"
885d501b 41
9265505b 42/// \cond CLASSIMP
a9e2aefa 43ClassImp(AliMUONResponseTrigger)
9265505b 44/// \endcond
a9e2aefa 45
885d501b 46namespace
47{
885d501b 48 AliMUON* muon()
49 {
50 return static_cast<AliMUON*>(gAlice->GetModule("MUON"));
51 }
52
53 void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg,
54 Double_t& xl, Double_t& yl, Double_t& zl)
55 {
56 // ideally should be :
57 // Double_t x,y,z;
58 // AliMUONGeometry::Global2Local(detElemId,xg,yg,zg,x,y,z);
59 // but while waiting for this geometry singleton, let's go through
60 // AliMUON still.
61
62 const AliMUONGeometryTransformer* transformer = muon()->GetGeometryTransformer();
63 transformer->Global2Local(detElemId,xg,yg,zg,xl,yl,zl);
64 }
885d501b 65}
66
30178c30 67//------------------------------------------------------------------
68AliMUONResponseTrigger::AliMUONResponseTrigger()
7e4a628d 69 : AliMUONResponse()
30178c30 70{
9265505b 71/// Default constructor
72}
73
74//------------------------------------------------------------------
75AliMUONResponseTrigger::~AliMUONResponseTrigger()
76{
77/// Destructor
925e6570 78}
30178c30 79
885d501b 80//_____________________________________________________________________________
81void
82AliMUONResponseTrigger::DisIntegrate(const AliMUONHit& hit, TList& digits)
83{
9265505b 84 /// Generate 2 digits (one on each cathode) from 1 hit, i.e. no cluster-size
85 /// generation (simplest response case).
885d501b 86
87 digits.Clear();
88
89 Float_t xhit = hit.X();
90 Float_t yhit = hit.Y();
91 Float_t zhit = 0; // FIXME : should it be hit.Z() ?
92 Int_t detElemId = hit.DetElemId();
93
94 Double_t x,y,z;
95 Global2Local(detElemId,xhit,yhit,zhit,x,y,z);
96
97 Float_t tof = hit.Age();
98 Int_t twentyNano(100);
d344444e 99 if (tof<AliMUONConstants::TriggerTofLimit())
885d501b 100 {
101 twentyNano=1;
102 }
103
866c3232 104 for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath )
885d501b 105 {
9265505b 106 const AliMpVSegmentation* seg
866c3232 107 = AliMpSegmentation::Instance()
108 ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cath));
885d501b 109
110 AliMpPad pad = seg->PadByPosition(TVector2(x,y),kFALSE);
111 Int_t ix = pad.GetIndices().GetFirst();
112 Int_t iy = pad.GetIndices().GetSecond();
113
114 AliDebug(1,Form("xhit,yhit=%e,%e lx,ly,lz=%e,%e,%e ix,iy=%d,%d",
115 xhit,yhit,x,y,z,ix,iy));
116
117 if ( !pad.IsValid() )
118 {
119 AliWarning(Form("hit w/o strip %d-%d xhit,yhit=%e,%e local x,y,z "
120 "%e,%e,%e ix,iy=%d,%d",detElemId,
121 cath,
122 xhit,yhit,x,y,z,ix,iy));
123 continue;
124 }
2a7d64a9 125 AliMUONDigit* d = new AliMUONDigit(detElemId,pad.GetLocation(0).GetFirst(),
126 pad.GetLocation(0).GetSecond(),cath);
127 d->SetPadXY(ix,iy);
128
129 //FIXME : a trigger digit can have several locations.
130 //this is not currently supported by the digit class. Change that or not ?
131 d->SetCharge(twentyNano);
885d501b 132 digits.Add(d);
885d501b 133 }
134
885d501b 135}
136
a9e2aefa 137
138
139
140