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