#ifndef ALIMUONTRIGGERCIRCUIT_H
#define ALIMUONTRIGGERCIRCUIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+* See cxx source for full Copyright notice */
-#include "TObjArray.h"
-#include <iostream.h>
-#include "AliMUONSegmentationTrigger.h"
+/* $Id$ */
+// Revision of includes 07/05/2004
+//
+/// \ingroup base
+/// \class AliMUONTriggerCircuit
+/// \brief MUON Trigger circuit
+///
+/// \author Philippe Crochet (LPCCFd)
-class AliMUONSegmentationTrigger;
-//----------------------------------------------
-class AliMUONTriggerCircuit :
-public TObject {
- public:
+#include <TObject.h>
+#include <TObjArray.h>
+#include "AliMpPad.h"
+#include "AliMUONGeometryTransformer.h"
+#include "AliMpVSegmentation.h"
+
+class TObjArray;
+class AliMUONTriggerCrateStore;
+class AliMUONGeometryTransformer;
+
+class AliMUONTriggerCircuit : public TObject
+{
+public:
AliMUONTriggerCircuit();
- virtual ~AliMUONTriggerCircuit(){;}
- // copy constructor
+ virtual ~AliMUONTriggerCircuit();
+ // copy constructor
AliMUONTriggerCircuit(const AliMUONTriggerCircuit& AliMUONTriggerCircuit);
// assignment operator
AliMUONTriggerCircuit& operator=(const AliMUONTriggerCircuit& AliMUONTriggerCircuit);
// initializations
- void Init(Int_t iCircuit);
+ void Init(Int_t iCircuit, const AliMUONTriggerCrateStore& crates);
- // get calculated pt
- Float_t PtCal(Int_t istripX, Int_t idev, Int_t istripY);
-
//--- methods which return member data related info
- Int_t GetIdCircuit();
- Int_t GetIdModule();
- Int_t GetNstripX();
- Int_t GetNstripY();
- Int_t GetPosCircuit();
- Int_t GetIdCircuitD();
- Int_t GetICircuitD();
- Int_t GetIdCircuitU();
- Int_t GetICircuitU();
- Int_t GetX2m();
- Int_t GetX2ud();
- void GetOrMud(Int_t orMud[2]);
- Int_t GetXcode(Int_t chamber, Int_t istrip);
- Int_t GetYcode(Int_t chamber, Int_t istrip);
- Float_t GetY11Pos(Int_t istrip);
- Float_t GetY21Pos(Int_t istrip);
- Float_t GetX11Pos(Int_t istrip);
-
- // Get reference to segmentation model
- virtual AliSegmentation* SegmentationModel(Int_t isec) {
- return (AliSegmentation *) (*fSegmentation)[isec-1];
- }
+ Float_t GetY11Pos(Int_t istrip) const;
+ Float_t GetY21Pos(Int_t istrip) const;
+ Float_t GetX11Pos(Int_t istrip) const;
+ Int_t DetElemId(Int_t ichamber, char side, Int_t iline);
+ void DecodeBoardName(const char* boardName, char& side,
+ Int_t& iLine,
+ Int_t& iCol);
+ Int_t DetElemId(Int_t ichamber, const char* localBoardName);
+
+ // void Print(Option_t* opt="") const;
+ // void dump(const char* what, const Float_t* array, Int_t size);
+ // void dump(const char* what, const Int_t* array, Int_t size);
+
+ void SetTransformer(const AliMUONGeometryTransformer* transformer) {fTransformer = transformer;}
+
+private:
- protected:
- TObjArray *fSegmentation; // pointer to segmentation
+ void LoadYPos(const AliMUONTriggerCrateStore& crates);
+ void LoadXPos(const AliMUONTriggerCrateStore& crates);
+ Int_t FirstStrip(const char* localBoardName);
- private:
- Int_t CircuitNumber(Int_t idCircuit);
- Int_t ModuleNumber(Int_t idModule);
- Int_t Module(Int_t idCircuit);
- Int_t Position(Int_t idCircuit);
- void LoadX2();
- void LoadXCode();
- void LoadYCode();
- void LoadYPos();
- void LoadXPos();
+ void FillXstrips(const AliMpVSegmentation* seg,
+ const Int_t detElemId, const Int_t icol,
+ const Int_t iFirstStrip, const Int_t iLastStrip,
+ Int_t liStripCircuit, Float_t *tab);
- ClassDef(AliMUONTriggerCircuit,1) // Trigger Circuit class
-
- private:
- Int_t fIdCircuit; // circuit Id number
- Int_t fX2m; // internal info needed by TriggerDecision
- Int_t fX2ud; // internal info needed by TriggerDecision
- Int_t fOrMud[2]; // internal info needed by TriggerDecision
- Int_t fXcode[4][32]; // code of X strips
- Int_t fYcode[4][32]; // code of Y strips
- Float_t fXpos11[16]; // X position of Y strips in MC11
- Float_t fYpos11[31]; // Y position of X strips in MC11
- Float_t fYpos21[63]; // Y position of X strips in MC21
+ void FillYstrips(const AliMpVSegmentation* seg,
+ const Int_t detElemId, const Int_t iFirstStrip,
+ const Int_t iLastStrip, Int_t liStripCircuit,
+ const Bool_t doubling);
-};
-#endif
+ void XYGlobal(Int_t detElemId, const AliMpPad& pad,
+ Double_t xyGlobal[4]);
+
+private:
+ Int_t fILocalBoard; ///< local board number
+ Float_t fXpos11[16]; ///< X position of Y strips in MC11
+ Float_t fYpos11[31]; ///< Y position of X strips in MC11
+ Float_t fYpos21[63]; ///< Y position of X strips in MC21
+ const AliMUONGeometryTransformer* fTransformer; //!< pointer to transformation
+ ClassDef(AliMUONTriggerCircuit,1) // Trigger Circuit class
+};
+#endif