21 #include "AliCodeTimer.h"
52 #include <Riostream.h>
56 #include <TCollection.h>
60 #include <TGeoMatrix.h>
65 #include <TObjArray.h>
66 #include <TObjString.h>
71 #include <TVirtualPad.h>
72 #include <TVirtualX.h>
101 AliFatal(
"Could not access mapping from OCDB !");
107 AliFatal(
"Could not access DDL Store from OCDB !");
190 Int_t pcbNumber)
const
194 if ( slat )
return slat->
GetPCB(pcbNumber);
201 Int_t pcbNumber)
const
206 return GetPCB(detElemId,cathodeType,pcbNumber);
231 return GetSlat(detElemId,cathodeType);
277 AliCodeTimerAutoClass(
"",0);
287 Double_t xg, Double_t yg, Double_t zg,
288 Double_t& xl, Double_t& yl, Double_t& zl)
const
293 Double_t pg[3] = { xg, yg, zg };
294 Double_t pl[3] = { 0., 0., 0. };
295 matrix->MasterToLocal(pg, pl);
304 Double_t xl, Double_t yl, Double_t zl,
305 Double_t& xg, Double_t& yg, Double_t& zg)
const
310 Double_t pl[3] = { xl, yl, zl };
311 Double_t pg[3] = { 0., 0., 0. };
312 matrix->LocalToMaster(pl, pg);
326 if (value > max) rv = 1;
327 else if (value <= min) rv = 0;
330 if ( TMath::AreEqualRel(max,min,1E-6) )
return gStyle->GetColorPalette(1);
331 Double_t
range = max - min;
332 Double_t offset = value - min;
333 rv =
gStyle->GetColorPalette( 1 +
int( offset*(
gStyle->GetNumberOfColors()-2)/range - 0.5 ) );
364 if ( sopt.Length() == 0 )
376 AliCodeTimerAuto(
"",0)
384 AliError(Form(
"ContourHandler for %s view is not created yet !",explodedView ?
"EXPLODED" :
"REAL"));
390 AliError(Form(
"Contour with name %s is already there",contour->GetName()));
402 return Form(
"Chamber%1d",chamberId+1);
410 return Form(
"Station%1d",stationId+1);
418 return Form(
"DE%04d",detElemId);
426 return Form(
"MANU%04d",manuId);
434 return Form(
"BUSPATCH%04d",busPatchId);
442 return Form(
"PCB%1d",pcbNumber);
475 ddl = AliDAQ::DdlIDOffset(
"MUONTRK") + de->
GetDdlId();
478 return Form(
"%s/%s/%s(DDL%4d)",
521 if (sname.Contains(
"BIT"))
523 Int_t i = (Int_t)(value);
524 TString rv = Form(
"%s = 0x%x",name,i);
530 return Form(
"%s = %e",name,value);
Int_t ColorFromValue(Double_t value, Double_t min, Double_t max) const
static AliMUONPainterHelper * Instance()
TString DEPathName(Int_t detElemId) const
AliMUONPainterEnv * fEnv
resources
void Local2Global(Int_t detElemId, Double_t xl, Double_t yl, Double_t zl, Double_t &xg, Double_t &yg, Double_t &zg) const
TString PCBName(Int_t pcbNumber) const
static TString AsString(Int_t status)
static AliMpSegmentation * Instance(Bool_t warn=true)
static AliMp::CathodType GetCathod(Int_t detElemId, AliMp::PlaneType planeType)
const AliMpSlat * GetSlatByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
virtual void Print(Option_t *opt="") const
const AliMpSlat * GetSlat(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
A PCB for station 3,4 or 5.
Int_t GetDEfromBus(Int_t busPatchId) const
virtual AliMpMotifPosition * MotifPosition(Int_t manuId) const =0
Return the position of a given manu (aka motifPosition)
AliMpExMap * GetTransformations() const
Get detection element geometrical transformations.
TString StationPathName(Int_t stationId) const
AliMUONContour * MergeContour(const TObjArray &contours, const char *name=0x0) const
static Bool_t LoadDDLStore(Bool_t warn=false)
const AliMpVSegmentation * GetMpSegmentationByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
const AliMpSector * GetSector(Int_t detElemId, AliMp::PlaneType planeType) const
AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true) const
A slat (building block of stations 3, 4 and 5)
The class defines the electronics properties of detection element.
TString ManuPathName(Int_t detElemId, Int_t manuId) const
void Print(Option_t *opt="") const
virtual ~AliMUONPainterHelper()
Bool_t Adopt(AliMUONContour *contour)
static AliMpDDLStore * Instance(Bool_t warn=true)
static Int_t GetChamberId(Int_t detElemId, Bool_t warn=true)
const AliMpSector * GetSector(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
TObjArray * GetAllContoursAsArray(Bool_t explodedView=kTRUE) const
AliMpPCB * GetPCB(Int_t detElemId, AliMp::PlaneType planeType, Int_t pcbNumber) const
void RegisterContour(AliMUONContour *contour, Bool_t explodedView=kTRUE)
AliMpPCB * GetPCB(Int_t i) const
Returns the i-th PCB of this slat.
AliMUONContourHandler * Exploded() const
AliMUONContour * GetContour(const char *contourName, Bool_t explodedGeometry=kTRUE) const
TString PCBPathName(Int_t detElemId, Int_t pcbNumber) const
AliMp::PlaneType GetPlaneType(Int_t manuId) const
TObjArray * AllContourArray() const
Get all the contours as an array.
static AliMp::StationType GetStationType(Int_t detElemId)
static AliMUONPainterHelper * fgInstance
global instance
TObject * GetValue(Int_t keyFirst, Int_t keySecond) const
AliMpMotifPosition * GetMotifPosition(Int_t detElemId, Int_t manuId) const
AliMUONContourHandler * Real() const
Holder for MUON tracker contours.
Utility class for the painters display.
AliMUONContour * MergeContours(const TObjArray &contours, const char *contourName, Bool_t explodedGeometry=kTRUE)
A sector (quadrant) of the MUON chamber of stations 1 and 2.
TString BusPatchPathName(Int_t busPatchId) const
AliMUONContour * GetContour(const char *contourname) const
Int_t GetDdlId() const
Return DDL Id.
Creator/merger of AliMUONContour objects.
const AliMpSlat * GetSlat(Int_t detElemId, AliMp::PlaneType planeType) const
void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg, Double_t &xl, Double_t &yl, Double_t &zl) const
The abstract base class for the segmentation.
AliMUONContourHandler * fReal
contours in real coordinates
TString StationName(Int_t stationId) const
TString BusPatchName(Int_t busPatchId) const
TString ChamberPathName(Int_t chamberId) const
AliMUONContourHandler * fExploded
contours in exploded coordinates
TString FormatValue(const char *name, Double_t value) const
TString ChamberName(Int_t chamberId) const
TString ManuName(Int_t manuId) const
TString DEName(Int_t detElemId) const
static Bool_t LoadMpSegmentation(Bool_t warn=false)
AliMp::CathodType GetCathodeType(Int_t detElemId, Int_t manuId) const
static Int_t ManuMask(AliMp::PlaneType planeType)