Adding new AddHit function
[u/mrichter/AliRoot.git] / MUON / AliMUON.h
CommitLineData
a9e2aefa 1#ifndef ALIMUON_H
2#define ALIMUON_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
fe4da5cc 8////////////////////////////////////////////////
5a35ac13 9// AliDetector Class for MUON subsystem //
fe4da5cc 10////////////////////////////////////////////////
11#include "AliDetector.h"
a9e2aefa 12
a9e2aefa 13class AliMUONChamber;
14class AliMUONLocalTrigger;
15class AliMUONGlobalTrigger;
16class AliMUONTriggerCircuit;
17class AliMUONTriggerDecision;
a30a000f 18class AliSegmentation;
a9e2aefa 19class AliMUONResponse;
375da359 20class AliMUONMerger;
a9e2aefa 21class AliMUONHit;
22class AliMUONPadHit;
a897a37a 23class AliMUONRawCluster;
30aaba74 24class AliMUONClusterFinderVS;
a9e2aefa 25class AliMUONReconstHit;
1cae9436 26class AliMUONMerger;
27
a9e2aefa 28class TVector;
94de3818 29#include "TObjArray.h"
a9e2aefa 30class TFile;
31class TTree;
fe4da5cc 32
33
fe4da5cc 34class AliMUON : public AliDetector {
35 public:
36 AliMUON();
37 AliMUON(const char *name, const char *title);
a9e2aefa 38 AliMUON(const AliMUON& rMUON);
fe4da5cc 39 virtual ~AliMUON();
a9e2aefa 40 virtual void AddHit(Int_t track , Int_t *vol, Float_t *hits);
5a35ac13 41 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
42 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
43 Float_t tof, Float_t momentum, Float_t theta,
44 Float_t phi, Float_t length, Float_t destep);
45 virtual void AddPadHit(Int_t* clhits); // To be removed !
a9e2aefa 46 virtual void AddDigits(Int_t id, Int_t* tracks, Int_t* charges,
47 Int_t* digits);
48 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
fe4da5cc 49 virtual void BuildGeometry();
a9e2aefa 50 void AddGlobalTrigger(Int_t *singlePlus, Int_t *singleMinus,
51 Int_t *singleUndef, Int_t *pairUnlike,
52 Int_t *pairLike);
53 void AddLocalTrigger(Int_t* ltrigger);
fe4da5cc 54 Int_t DistancetoPrimitive(Int_t px, Int_t py);
a9e2aefa 55 virtual Int_t IsVersion() const {return 0;}
56 TClonesArray *PadHits() {return fPadHits;}
57 TClonesArray *LocalTrigger() {return fLocalTrigger;}
58 TClonesArray *GlobalTrigger() {return fGlobalTrigger;}
9e1a0ddb 59 virtual void MakeBranch(Option_t *opt=" ", const char *file=0);
cd4df77b 60 virtual void MakeBranchInTreeD(TTree *treeD, const char *file=0);
fe4da5cc 61 void SetTreeAddress();
62 virtual void ResetHits();
63 virtual void ResetDigits();
a9e2aefa 64 virtual void ResetTrigger();
a897a37a 65 virtual void ResetRawClusters();
a9e2aefa 66 // Cluster Finding
fe311ef1 67 virtual void Digits2Reco();
68 virtual void FindClusters();
a9e2aefa 69 // Digitisation
2ab0c725 70 virtual void SDigits2Digits();
fe4da5cc 71// Configuration Methods (per station id)
72//
73// Set Chamber Segmentation Parameters
a9e2aefa 74// id refers to the station and isec to the cathode plane
75// Set Z values for all chambers
76 virtual void SetChambersZ(const Float_t *Z);
77 virtual void SetChambersZToDefault(void);
78 virtual void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2);
fe4da5cc 79// Set Signal Generation Parameters
a897a37a 80 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
81 virtual void SetChargeSlope(Int_t id, Float_t p1);
82 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 83 virtual void SetMaxAdc(Int_t id, Int_t p1);
fe4da5cc 84// Set Segmentation and Response Model
a9e2aefa 85 virtual void SetSegmentationModel(Int_t id, Int_t isec,
a30a000f 86 AliSegmentation *segmentation);
a9e2aefa 87 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
fe4da5cc 88 virtual void SetNsec(Int_t id, Int_t nsec);
a897a37a 89// Set Reconstruction Model
30aaba74 90 virtual void SetReconstructionModel(Int_t id, AliMUONClusterFinderVS *reconstruction);
1cae9436 91// Set Merger/Digitizer
92 virtual void SetMerger(AliMUONMerger* merger);
93 virtual AliMUONMerger* Merger();
94
fe4da5cc 95// Set Stepping Parameters
a897a37a 96 virtual void SetMaxStepGas(Float_t p1);
97 virtual void SetMaxStepAlu(Float_t p1);
98 virtual void SetMaxDestepGas(Float_t p1);
99 virtual void SetMaxDestepAlu(Float_t p1);
5c1f55c5 100 virtual void SetAcceptance(Bool_t acc=0, Float_t angmin=2, Float_t angmax=9);
fe4da5cc 101// Response Simulation
802a864d 102 virtual void MakePadHits(Float_t xhit,Float_t yhit, Float_t zhit,
a9e2aefa 103 Float_t eloss, Float_t tof, Int_t id);
104// get Trigger answer
105 void Trigger(Int_t nev);
fe4da5cc 106// Return reference to Chamber #id
a9e2aefa 107 virtual AliMUONChamber& Chamber(Int_t id)
108 {return *((AliMUONChamber *) (*fChambers)[id]);}
109// Return reference to Circuit #id
110 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
111 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
fe4da5cc 112// Retrieve pad hits for a given Hit
a9e2aefa 113 virtual AliMUONPadHit* FirstPad(AliMUONHit *hit, TClonesArray *padHits);
114 virtual AliMUONPadHit* NextPad(TClonesArray *padHits);
115// Return pointers to digits
fe4da5cc 116 TObjArray *Dchambers() {return fDchambers;}
117 Int_t *Ndch() {return fNdch;}
a9e2aefa 118 virtual TClonesArray *DigitsAddress(Int_t id)
119 {return ((TClonesArray *) (*fDchambers)[id]);}
fe4da5cc 120// Return pointers to reconstructed clusters
a897a37a 121 TObjArray *RawClusters() {return fRawClusters;}
a9e2aefa 122 Int_t *Nrawch() {return fNrawch;}
123 virtual TClonesArray *RawClustAddress(Int_t id)
124 {return ((TClonesArray *) (*fRawClusters)[id]);}
125
126 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
127 Int_t icluster);
128// Copy Operator
129 AliMUON& operator = (const AliMUON& rhs);
a897a37a 130
a9e2aefa 131
fe4da5cc 132 protected:
1bd26093 133 Int_t fNCh; // Number of chambers
134 Int_t fNTrackingCh; // Number of tracking chambers
fe4da5cc 135 TObjArray *fChambers; // List of Tracking Chambers
3e1872ed 136 TObjArray *fTriggerCircuits; // List of Trigger Circuits
a9e2aefa 137 Int_t fNPadHits; // Number of pad hits
138 TClonesArray *fPadHits; // List of pad hits
fe4da5cc 139 TObjArray *fDchambers; // List of digits
1bd26093 140 Int_t *fNdch; // [fNCh] Number of digits per chamber
a9e2aefa 141 TObjArray *fRawClusters; // List of raw clusters
1bd26093 142 Int_t *fNrawch; // [fNTrackingCh] Number of raw clusters per chamber
a9e2aefa 143 Int_t fNLocalTrigger; // Number of Local Trigger
144 TClonesArray *fLocalTrigger; // List of Local Trigger
145 Int_t fNGlobalTrigger; // Number of Global Trigger
146 TClonesArray *fGlobalTrigger; // List of Global Trigger
1cae9436 147
fe4da5cc 148//
149 Bool_t fAccCut; //Transport acceptance cut
150 Float_t fAccMin; //Minimum acceptance cut used during transport
151 Float_t fAccMax; //Minimum acceptance cut used during transport
152//
153
154// Stepping Parameters
155 Float_t fMaxStepGas; // Maximum step size inside the chamber gas
156 Float_t fMaxStepAlu; // Maximum step size inside the chamber aluminum
157 Float_t fMaxDestepGas; // Maximum relative energy loss in gas
158 Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
a897a37a 159
fe4da5cc 160
a897a37a 161
a9e2aefa 162// Pad Iterator
163 Int_t fMaxIterPad; // Maximum pad index
164 Int_t fCurIterPad; // Current pad index
165// Background eent for event mixing
30f212b7 166 Text_t *fFileName; // ! File with background hits
375da359 167 AliMUONMerger *fMerger; // ! pointer to merger
a897a37a 168
62468ef9 169 ClassDef(AliMUON,2) // MUON Detector base class
a897a37a 170};
fe4da5cc 171#endif
172