20 #include "AliCodeTimer.h"
42 #include <Riostream.h>
45 #include <TObjArray.h>
46 #include <TObjString.h>
48 #include <TTimeStamp.h>
72 #define PRECISION 1E-12
74 Double_t Difference(Double_t v1, Double_t v2)
77 return TMath::Abs(d) <
PRECISION ? 0.0 : d;
80 Double_t AbsoluteDifference(Double_t v1, Double_t v2)
82 return TMath::Abs(Difference(v1,v2));
86 Double_t RelativeDifference(Double_t v1, Double_t v2)
88 if ( TMath::Abs(v1) <
PRECISION )
return 0.0;
92 Double_t AbsoluteRelativeDifference(Double_t v1, Double_t v2)
94 return TMath::Abs(RelativeDifference(v1,v2));
101 Bool_t issingleevent)
103 fIsSingleEvent(issingleevent),
106 fBusPatchValues(0x0),
110 fDimension(External2Internal(dimension)+fgkExtraDimension),
112 fDimensionNames(new
TObjArray(fDimension+fgkVirtualExtraDimension)),
113 fExternalDimensionNames(new
TObjArray(dimension)),
114 fExternalDimension(dimension),
115 fHistogramming(new Int_t[fExternalDimension]),
119 fIsChannelLevelEnabled(kTRUE),
120 fIsManuLevelEnabled(kTRUE),
121 fIsBustPatchLevelEnabled(kTRUE),
122 fIsPCBLevelEnabled(kTRUE),
124 fNofEventsPerDDL(0x0)
140 fIsSingleEvent(kFALSE),
143 fBusPatchValues(0x0),
149 fDimensionNames(0x0),
150 fExternalDimensionNames(0x0),
151 fExternalDimension(0),
156 fIsChannelLevelEnabled(kFALSE),
157 fIsManuLevelEnabled(kTRUE),
158 fIsBustPatchLevelEnabled(kTRUE),
159 fIsPCBLevelEnabled(kTRUE),
161 fNofEventsPerDDL(0x0)
169 AliFatal(
"Cannot create a tracker data from nothing in that case !");
174 AliError(
"Cannot work without (full) mapping");
197 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
203 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
205 Int_t detElemId, manuId;
224 Int_t mid =
GetParts(wec,chamber,de,busPatch,pcb,manu,channel,mpde);
228 AliError(Form(
"Something is wrong for DE %5d : manuId = %d vs mid = %d",detElemId,manuId,mid));
234 AliError(
"Got a < 0 manuId. Should not happen here !");
238 assert(channel==0x0);
244 AliError(Form(
"Incoherent number of manu channels for DE %5d MANU %5d : %d vs %d",
245 detElemId,manuId,n1,n2));
254 if ( nevents[ddl] == 0 )
260 if ( nevents.At(ddl) != nevt )
262 AliError(Form(
"Nevt mismatch for DE %5d MANU %5d DDL %d : %d vs %d",
263 detElemId,manuId,ddl,nevents.At(ddl),nevt));
268 for ( Int_t i = 0; i < wec->
Dimension()-1; ++i )
289 fIsSingleEvent(kFALSE),
292 fBusPatchValues(0x0),
298 fDimensionNames(0x0),
299 fExternalDimensionNames(0x0),
300 fExternalDimension(0),
305 fIsChannelLevelEnabled(kFALSE),
306 fIsManuLevelEnabled(kFALSE),
307 fIsBustPatchLevelEnabled(kFALSE),
308 fIsPCBLevelEnabled(kFALSE),
310 fNofEventsPerDDL(0x0)
318 AliFatal(
"Cannot create a tracker data from nothing in that case !");
323 AliError(
"Cannot work without (full) mapping");
337 AliFatal(
"Wrong parameter. Must be 1 or 2");
367 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
373 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
375 Int_t detElemId = external->
ID0();
381 AliError(Form(
"Got an invalid DE (%d) from external store",detElemId));
400 AliError(Form(
"Incoherent number of dimensions for DE%d : %d vs %d",
409 if ( nevents[ddl] == 0 )
415 if ( nevents.At(ddl) != nevt )
417 AliError(Form(
"Nevt mismatch for DE %5d DDL %d : %d vs %d",
418 detElemId,ddl,nevents.At(ddl),nevt));
423 for ( Int_t i = 0; i < wec->
Dimension()-1; ++i )
461 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
467 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
469 Int_t busPatchId = external->
ID0();
475 AliError(Form(
"Got an invalid buspatchId (%d) from external store",busPatchId));
496 AliError(Form(
"Incoherent number of dimensions for BP%d : %d vs %d",
505 if ( nevents[ddl] == 0 )
511 if ( nevents.At(ddl) != nevt )
513 AliError(Form(
"Nevt mismatch for BP %5d DDL %d : %d vs %d",
514 busPatchId,ddl,nevents.At(ddl),nevt));
519 for ( Int_t i = 0; i < wec->
Dimension()-1; ++i )
537 fIsSingleEvent(kFALSE),
540 fBusPatchValues(0x0),
544 fDimension(External2Internal(1)+fgkExtraDimension),
546 fDimensionNames(new
TObjArray(fDimension+fgkVirtualExtraDimension)),
547 fExternalDimensionNames(new
TObjArray(1)),
548 fExternalDimension(1),
549 fHistogramming(new Int_t[fExternalDimension]),
553 fIsChannelLevelEnabled(kTRUE),
554 fIsManuLevelEnabled(kTRUE),
555 fIsBustPatchLevelEnabled(kTRUE),
556 fIsPCBLevelEnabled(kFALSE),
558 fNofEventsPerDDL(0x0)
565 AliError(
"Cannot work without (full) mapping");
577 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
589 deit.
First(chamberId);
595 Int_t detElemId = mpde->
GetId();
601 for ( Int_t iBusPatch = 0; iBusPatch < mpde->
GetNofBusPatches(); ++iBusPatch )
611 for ( Int_t iManu = 0 ;iManu < mpbp->
GetNofManus(); ++iManu )
691 AliCodeTimerAuto(
"",0);
695 AliError(
"Incompatible IsChannelLevelEnabled status");
701 AliError(
"Incompatible IsManuLevelEnabled status");
707 AliError(
"Incompatible IsSingleEvent status");
713 AliError(
"Incompatible dimensions");
719 AliError(
"Incompatible number of Ddls");
726 AliError(Form(
"Incompatible histogramming (%p vs %p) (xmax = %e vs %e ; xmin = %e vs %e)",
737 AliError(Form(
"Incompatible histogramming for external dimension %d",i));
776 for ( Int_t i = 0; i <
fNofDDLs; ++i )
785 while ( ( store = static_cast<AliMUONVStore*>(nexthisto()) ) )
787 TIter ns(store->CreateIterator());
789 while ( ( h = static_cast<AliMUONSparseHisto*>(ns()) ) )
795 thisStore = store->
Create();
796 thisStore->SetUniqueID(store->GetUniqueID());
814 for ( Int_t i = 0 ; i <
fNofDDLs; ++i )
831 while ( ( p = static_cast<AliMUONVCalibParam*>(next()) ) )
837 dest.
Add(static_cast<AliMUONVCalibParam*>(p->Clone()));
855 while ( ( p = static_cast<AliMUONVCalibParam*>(next()) ) )
861 dest.
Add(static_cast<AliMUONVCalibParam*>(p->Clone()));
875 for ( Int_t i = 0; i < src.
Size(); ++i )
877 for ( Int_t j = 0; j < src.
Dimension(); ++j )
904 fNofDDLs = AliDAQ::NumberOfDdls(
"MUONTRK");
906 for ( Int_t i = 0; i <
fNofDDLs; ++i )
914 if (nevents->GetSize() !=
fNofDDLs )
916 AliError(Form(
"nof of ddl per event array size is incorrect : got %d, expecting %d",
921 for ( Int_t i = 0 ; i <
fNofDDLs; ++i )
929 for ( Int_t i = 0 ; i <
fNofDDLs; ++i )
946 Int_t numberOfBusPatches(0);
947 Int_t numberOfDEs(0);
958 while ( next() ) ++numberOfBusPatches;
994 AliCodeTimerAuto(GetName(),0);
998 AliError(Form(
"%s is supposed to be single event only",GetName()));
1013 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
1017 AliError(Form(
"Incompatible dimensions %d vs %d",
1030 Int_t manuId =
GetParts(external,chamber,de,busPatch,pcb,manu,channel,mpde);
1032 if ( manuId < 0 )
continue;
1034 Int_t detElemId = mpde->
GetId();
1036 Double_t value[] = { 0.0, 0.0 };
1040 for ( Int_t i = 0; i < external->Size(); ++i )
1047 if ( existingChannel )
1049 Bool_t validChannel(kFALSE);
1051 for ( Int_t j = 0; j < external->Dimension(); ++j )
1053 Double_t vext = external->IsDoublePrecision() ?
1054 external->ValueAsDoubleFast(i,j) :
1055 external->ValueAsFloatFast(i,j);
1059 validChannel = kTRUE;
1064 value[1] = vext*vext;
1071 for ( Int_t k = 0; k < nk; ++k )
1165 AliCodeTimerAuto(
"",0);
1171 AliError(Form(
"Got an invalid buspatchId = %d",busPatchId));
1235 AliCodeTimerAuto(
"",0);
1245 it.
First(chamberId);
1273 Int_t manuChannel, Int_t dim)
const
1313 for ( Int_t i = 0; i <
fNofDDLs; ++i )
1325 const char* outnamebase,
1332 Double_t (*difffunction)(Double_t,Double_t)=0x0;
1333 TString suffix(
"unknown");
1337 difffunction = Difference;
1342 difffunction = AbsoluteDifference;
1347 difffunction = RelativeDifference;
1352 difffunction = AbsoluteRelativeDifference;
1358 outname.Form(
"%s:%s",outnamebase,suffix.Data());
1362 return CompareData(d1,d2,outname.Data(),difffunction);
1374 const char* outname,
1375 Double_t(*diff)(Double_t,Double_t))
1381 AliErrorClass(
"Cannot compare data of incompatible dimensions");
1386 Int_t detElemId, manuId;
1390 while ( it.
Next(detElemId,manuId) )
1413 Double_t d = diff(d1.
Channel(detElemId,manuId,i,k),
1414 d2.
Channel(detElemId,manuId,i,k));
1435 Int_t manuChannel)
const
1446 Int_t detElemId, Int_t manuId)
const
1450 AliCodeTimerAuto(
"",0);
1460 for ( Int_t i = 0; i < c->
Size(); ++i )
1462 Double_t value(0.0);
1507 AliCodeTimerAuto(
"",0);
1566 it.
First(chamberid);
1590 TObjString* value =
static_cast<TObjString*
>(
fDimensionNames->At(dim));
1593 return value->String();
1597 return TString(
"Invalid");
1641 return value->String();
1645 return TString(
"Invalid");
1652 Int_t dim, Double_t value)
1667 AliDebug(1,Form(
"DE %04d MANU %04d CH %02d dim %d value %e h %p",detElemId,manuId,manuChannel,dim,value,h));
1671 h->
Fill(static_cast<Int_t>(TMath::Nint(value)));
1704 m->SetUniqueID( ( manuId << 16 ) | detElemId );
1713 h->SetUniqueID(dim);
1724 Int_t manuChannel, Int_t dim)
const
1733 UInt_t uid = ( manuChannel << 16 ) | dim;
1743 Int_t manuChannel, Int_t dim)
1753 m->SetUniqueID( ( manuId << 16 ) | detElemId );
1757 UInt_t uid = ( manuChannel << 16 ) | dim;
1764 h->SetUniqueID(uid);
1775 Int_t& detElemId, Int_t& manuId)
const
1781 AliError(
"Could not access manu store from OCDB !");
1785 if ( param.
ID1() <= 0 )
1788 Int_t serial = param.
ID0();
1794 AliDebug(1,Form(
"DE %d manuId %d from serial %d is not correct !",
1795 detElemId,manuId,serial));
1801 detElemId = param.
ID0();
1802 manuId = param.
ID1();
1820 chamber = de = busPatch = pcb = manu = channel = 0x0;
1847 Int_t busPatchId = ddlStore->
GetBusPatchId(detElemId,manuId);
1849 if ( busPatchId <= 0 )
1854 Int_t pcbIndex = -1;
1869 manu =
ManuParam(detElemId,manuId,kTRUE);
1879 if ( pcbIndex >= 0 )
1881 pcb =
PCBParam(detElemId,pcbIndex,kTRUE);
1916 return (
ManuParam(detElemId,manuId) != 0 );
1924 return (
PCBParam(detElemId,pcbIndex) != 0 );
1961 AliCodeTimerAuto(
"",0);
1980 if (!list)
return 0;
1985 const TObject* o(0x0);
1987 while ( ( o = next() ) )
1992 AliError(Form(
"Object named %s is not an AliMUONTrackerData ! Skipping it",
1997 Bool_t ok =
Add(*data);
2000 AliError(
"Got incompatible objects");
2074 AliCodeTimerAuto(
"",0);
2096 for ( Int_t i = 0; i <
fNofDDLs; ++i )
2098 cout << Form(
"DDL %04d Nevents=%10d",AliDAQ::DdlID(
"MUONTRK",i),
fNofEventsPerDDL[i]) << endl;
2104 cout <<
"Is not storing data at the channel level" << endl;
2109 cout <<
"Is not storing data at the manu level" << endl;
2115 cout << Form(
"External Dimension %2d Name %s %s",i,
2116 ( name ? name->String().Data() :
"null"),
2123 cout << Form(
"Internal Dimension %2d Name %s",i,
2124 ( name ? name->String().Data() :
"null")) << endl;
2130 if ( sopt.Contains(
"CHANNEL") )
2138 AliWarning(
"You requested channel values, but they were not stored !");
2142 if ( sopt.Contains(
"MANU") )
2150 AliWarning(
"You requested manu values, but they were not stored !");
2179 AliError(Form(
"%s : dimension %s : Index out of bounds : %d / %d",
2189 const char*
prefix[] = {
"mean",
"sigma" };
2191 for ( Int_t i = 0; i < 2; ++i )
2217 AliWarning(Form(
"Will %s make histogram for data %s index %d : that might ressemble a memory leak depending on the input data",
2218 value ?
"":
"not", GetName(),index));
2231 AliError(Form(
"Index out of bounds : %d / %d",index,
fDimension));
2235 TObjString* ovalue =
static_cast<TObjString*
>(
fDimensionNames->At(index));
2269 Int_t dim, Int_t ddlId)
const
2288 if ( ddlId < 0 ) AliError(
"Got a negative ddl id !");
2298 Double_t x = value/occ;
2300 return ( TMath::Finite(x) ? x : 0.0 ) ;
2310 return TMath::Sqrt(TMath::Abs((value-nn*mean*mean)/(nn-1.0)));
2321 AliMUONTrackerData::Streamer(TBuffer &R__b)
2325 if (R__b.IsReading()) {
2326 AliMUONTrackerData::Class()->ReadBuffer(R__b,
this);
2335 for ( Int_t i = 0; i <
fNofDDLs; ++i )
2342 AliMUONTrackerData::Class()->WriteBuffer(R__b,
this);
2355 AliError(
"Mapping not loaded. Cannot work");
2361 AliError(
"No manu values. Cannot work");
2365 ofstream out(filename);
2369 AliError(Form(
"Cannot create file %s",filename));
2373 out <<
"//===========================================================================" << endl;
2374 out <<
"// Hit counter exported from $Id$" << endl;
2375 out <<
"//===========================================================================" << endl;
2376 out <<
"//" << endl;
2377 out <<
"// * Run Number : " << runNumber << endl;
2378 out <<
"// * File Creation Date : " << TTimeStamp().AsString(
"l") << endl;
2379 out <<
"//---------------------------------------------------------------------------" << endl;
2380 out <<
"// BP MANU SUM_N NEVENTS" << endl;
2381 out <<
"//---------------------------------------------------------------------------" << endl;
2386 while ( ( manu = static_cast<AliMUONVCalibParam*>(next()) ) )
2388 Int_t detElemId = manu->
ID0();
2389 Int_t manuId = manu->ID1();
2392 if ( busPatchId < 0 || ddl < 0 )
2394 AliError(Form(
"Got invalid (DE,manu,bp,ddl)=(%d,%d,%d,%d). Skipping it",detElemId,manuId,busPatchId,ddl));
2416 Double_t sumn = 1000.0;
2417 Double_t sumw = sumn*y;
2418 Double_t sumw2 = (sumn-1)*ey*ey+sumw*sumw/sumn;
Int_t GetNofManus() const
virtual TIterator * CreateIterator() const =0
Return an iterator to loop over the whole store.
static Int_t NofChambers()
Return number of chambers.
Implementation of AliMUONVTrackerData.
virtual TString ExternalDimensionName(Int_t dim) const
Get the name of a given (external) dimension.
The iterator over detection elements.
Float_t ManuProbability(Int_t detElemId, Int_t manuId) const
Bool_t fIsSingleEvent
whether we can deal with more than one event
static Float_t InvalidFloatValue()
Return 1E38 as invalid float value.
Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const
Returns the index of PCB (within a St345 slat) for a given manu number.
virtual Int_t NumberOfEvents(Int_t ddlNumber) const
Returns the number of events we have seen so far.
Bool_t fIsManuLevelEnabled
whether we allow storing of manu (fManuValues) values
Int_t External2Internal(Int_t index) const
Convert from external to internal index.
Double_t fXmin
min x value for histograms
virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim=0) const
Get the value for a given channel and given dimension.
virtual Bool_t Add(TObject *object)
virtual Int_t IndexOfOccupancyDimension() const
Index of the dimension containing the occupancy number.
static AliMpSegmentation * Instance(Bool_t warn=true)
virtual Float_t ValueAsFloat(Int_t i, Int_t j=0) const =0
virtual void Print(Option_t *wildcard="") const
Print all objects whose name matches wildcard.
Int_t DdlIdFromBusPatchId(Int_t buspatchid) const
void SetExternalDimensionName(Int_t index, const char *value)
AliMUONVCalibParam * CreatePCBParam(Int_t detElemId, Int_t pcbIndex) const
virtual Int_t Size() const =0
The number of channels handled by this object.
The top container class for DDLs, det elements and bus patched.
Bool_t UpdateNumberOfEvents(TArrayI *nevents)
virtual void SetValueAsFloat(Int_t i, Int_t j, Float_t value)=0
Set one value, for channel i, dimension j. Consider value is a float.
Int_t fDimension
the dimension of the data
virtual Bool_t Replace(const AliMUONVStore &store)=0
Replace values.
virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const
Get the value for a given buspatch and given dimension.
AliMp::StationType GetStationType() const
AliMUONVStore * fHistos
the lowest histograms we have
virtual Int_t GetSize() const =0
The number of objects stored.
Int_t GetDEfromBus(Int_t busPatchId) const
virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const =0
Whether we have data for a given manu.
AliMUONVStore * fBusPatchValues
the bus patch store
AliMUONVCalibParam * ChannelParam(Int_t detElemId, Int_t manuId, const AliMUONVCalibParam *external=0x0) const
virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim=0) const =0
Get the value for a given channel and given dimension.
Collection of methods usefull to DCS handling for MUON TRK and TRG.
virtual ~AliMUONTrackerData()
const AliMpVSegmentation * GetMpSegmentationByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
virtual void SetDimensionName(Int_t index, const char *value)
Set the name of a given dimension.
virtual void SetValueAsDoubleFast(Int_t i, Int_t j, Double_t value)
Same as above but w/o bound checking.
Int_t NumberOfPCBs(Int_t detElemId) const
void BuildFromBPStore(const AliMUONVStore &bpStore)
Int_t * fHistogramming
whether we should histogram the dimension(s)
TObjArray * fExternalDimensionNames
the names of the external (i.e. original) dimensions
virtual Bool_t HasChamber(Int_t chamberId) const
Whether we have data for a given chamber.
void Add2D(const AliMUONVStore &src, AliMUONVStore &dest) const
AliMpDetElement * CurrentDE() const
Int_t CurrentDEId() const
virtual Bool_t Replace(const AliMUONVStore &channelValues)
Replace values.
AliMUONVCalibParam * CreateDouble(const AliMUONVCalibParam ¶m, Int_t detElemId, Int_t manuId) const
Double_t Value(const AliMUONVCalibParam ¶m, Int_t i, Int_t dim, Int_t ddlId) const
AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true) const
virtual Double_t ValueAsDouble(Int_t i, Int_t j=0) const
void BuildFromDEStore(const AliMUONVStore &deStore)
Int_t GetManuId(Int_t index) const
virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const
Whether we have data for a given PCB.
Int_t Dimension() const
The number of values we actually store for each item.
static AliMpManuStore * Instance(Bool_t warn=true)
static Bool_t LoadManuStore(Bool_t warn=false)
The class defines the electronics properties of detection element.
AliMUONVCalibParam * CreateChamberParam(Int_t chamberId) const
virtual Bool_t Add(TObject *object)
Add an object to the store.
Bool_t Next(Int_t &detElemId, Int_t &manuId)
Class to loop over all manus of MUON Tracker.
MpPair_t GetDetElemIdManu(Int_t manuSerial) const
AliMUONVStore * fChamberValues
the chamber store
Float_t DetectionElementProbability(Int_t detElemId) const
void Print(const char *method, TStopwatch &timer, Int_t n)
AliMUONVStore * fPCBValues
the pcb store
virtual Bool_t HasBusPatch(Int_t busPatchId) const
Whether we have data for a given buspath.
Container of calibration values for a given number of channels.
virtual void Print(Option_t *wildcard, Option_t *opt) const
Print, with option, all objects whose name matches wildcard.
virtual void DisableManuLevel()
Disable storing values at the manu level.
virtual TString DimensionName(Int_t dim) const
Get the name of a given (internal) dimension.
static AliMpDDLStore * Instance(Bool_t warn=true)
virtual Bool_t IsSingleEvent() const
Whether we can be run.
static Int_t GetChamberId(Int_t detElemId, Bool_t warn=true)
static Int_t ManuNofChannels()
Max number of channels per manu.
virtual void NumberOfEventsChanged()
Signal to indicate that the number of events changed.
virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const
Get the value for a given PCDB and given dimension.
TObjArray * fDimensionNames
the names of the (internal) dimensions
void SetInternalDimensionName(Int_t index, const char *value)
Bool_t fIsBustPatchLevelEnabled
whether we allow storing of bus patches (fBusPatchValues) values
Int_t GetBusPatchId(Int_t detElemId, Int_t manuId) const
virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const
Get the value for a given chamber and given dimension.
virtual Bool_t IsHistogrammed(Int_t dim) const
Whether we have histograms for a given dimension, or not.
virtual AliMUONVStore * Create() const =0
Create an empty copy of this.
void AddCalibParams(const AliMUONVCalibParam &src, AliMUONVCalibParam &dest) const
Int_t DdlIdFromDetElemId(Int_t detelemid) const
AliMUONVCalibParam * CreateBusPatchParam(Int_t busPatch) const
Float_t ChannelProbability(Int_t detElemId, Int_t manuId, Int_t manuChannel) const
virtual Int_t ID0() const
First id of this object.
Int_t DdlIdFromChamberId(Int_t chamberid) const
virtual Int_t ID1() const
Second id of this object (might not be required)
Int_t GetParts(AliMUONVCalibParam *external, AliMUONVCalibParam *&chamber, AliMUONVCalibParam *&de, AliMUONVCalibParam *&busPatch, AliMUONVCalibParam *&pcb, AliMUONVCalibParam *&manu, AliMUONVCalibParam *&channel, AliMpDetElement *&mpde)
virtual Bool_t HasDetectionElement(Int_t detElemId) const =0
Whether we have data for a given detection element.
virtual Int_t IndexOfNumberDimension() const
Index of the dimension containing the number of time an item was hit.
Implementation of AliMUONVCalibParam for tuples of double.
virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const
Get the value for a given DE and given dimension.
virtual void DisableChannelLevel()
Disable storing values at the channel level.
AliMpBusPatch * GetBusPatch(Int_t busPatchId, Bool_t warn=true) const
Int_t GetDdlId() const
Return the Ddl Id.
virtual void SetDimensionName(Int_t index, const char *value)=0
Set the name of a given dimension.
AliMUONVCalibParam * BusPatchParam(Int_t busPatch, Bool_t create=kFALSE) const
A very memory compact histogram to hold some tracker distributions.
virtual TObject * FindObject(UInt_t identifier) const
Return the object stored with id.
virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const
Get the number of times a given channel was hit.
Implementation of AliMUONVStore.
Int_t Fill(Double_t value)
void MakeHistogramForDimension(Int_t index, Bool_t value, Double_t xmin=0.0, Double_t xmax=4096.0)
Select a dimension to be histogrammed (if CanHistogram==kTRUE) only.
AliMUONVStore * fChannelValues
the channel store
AliMUONVStore * fDEValues
the detection element store
Int_t NofChannelsInManu(Int_t manuId) const
virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const =0
Bool_t Add(const AliMUONTrackerData &data)
void Add1D(const AliMUONVStore &src, AliMUONVStore &dest) const
virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const
Whether we have data for a given manu.
Basic implementation of AliMUONVStore container using AliMpExMap internally.
Int_t GetDdlId() const
Return DDL Id.
static void DispatchValue(AliMUONVCalibParam ¶m, Int_t index, Double_t y, Double_t ey, Int_t nchannels)
void FillHisto(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim, Double_t value)
Double_t fXmax
max x value for histograms
virtual Bool_t Add(TObject *object)=0
Add an object to the store.
Int_t GetNofBusPatches() const
The class defines the properties of BusPatch.
virtual Int_t Dimension() const =0
j indices in following methods are valid from 0 to Dimension()-1.
AliMUONVCalibParam * DetectionElementParam(Int_t detElemId, Bool_t create=kFALSE) const
virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const
Get the value for a given manu and given dimension.
static const Int_t fgkExtraDimension
to hold extra information
The abstract base class for the segmentation.
Implementation of AliMUONVStore.
Int_t GetBusPatchId(Int_t index) const
AliMUONVCalibParam * CreateDetectionElementParam(Int_t detElemId) const
Int_t fNevents
the number of events treated
virtual Bool_t Add(const AliMUONVStore &store, TArrayI *arrayOfNofEventsPerDDL=0x0)=0
Add values for one event from one full store.
Int_t PairFirst(MpPair_t pair)
Decode the first integer from encoded pair.
virtual Int_t NumberOfDimensions() const
Returns the number of dimensions (i.e. the number of values) each element has.
virtual Bool_t HasDetectionElement(Int_t detElemId) const
Whether we have data for a given detection element.
AliMUONVCalibParam * CreateManuParam(Int_t detElemInd, Int_t manuId) const
static AliMUONVTrackerData * CompareData(const AliMUONVTrackerData &d1, const AliMUONVTrackerData &d2, const char *outname, Double_t(*diff)(Double_t, Double_t))
virtual TString ExternalDimensionName(Int_t dim) const =0
Get the name of a given (external) dimension.
Object to hold the list of elements we want to reject from the reconstruction.
virtual void Clear(Option_t *opt="")
Reset the data.
virtual Int_t ExternalDimension() const
The number of values we are inputting.
virtual TObject * FindObject(UInt_t i) const
Find an object using a single id.
virtual Int_t NumberOfDimensions() const =0
The number of dimensions we are handling.
AliMUONVCalibParam * ManuParam(Int_t detElemId, Int_t manuId, Bool_t create=kFALSE) const
AliMUONSparseHisto * GetManuSparseHisto(Int_t detElemId, Int_t manuId, Int_t dim=0)
virtual Long64_t Merge(TCollection *list)
To allow merging of different objects.
Float_t BusPatchProbability(Int_t busPatchId) const
virtual void Clear(Option_t *opt="")=0
Clear ourselves (i.e. Reset)
Bool_t InternalAdd(const AliMUONVStore &store, TArrayI *nevents)
Bool_t IsConnectedChannel(Int_t manuId, Int_t manuChannel) const
Bool_t ExportAsASCIIOccupancyFile(const char *filename, Int_t runNumber) const
Bool_t Add(const AliMUONSparseHisto &h)
Int_t PairSecond(MpPair_t pair)
Decode the second integer from encoded pair.
Int_t * fNofEventsPerDDL
the number of events treated (per DDL)
Base class for MUON data stores.
Int_t NofChannels() const
Return the number of channels in this detection element.
void GetDEManu(const AliMUONVCalibParam ¶m, Int_t &detElemId, Int_t &manuId) const
static const Int_t fgkVirtualExtraDimension
to give access to information not stored, but computed on the fly
static Bool_t LoadAll(Bool_t warn=false)
AliMUONVCalibParam * ChamberParam(Int_t chamberId, Bool_t create=kFALSE) const
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
Int_t GetId() const
Return Id.
AliMUONSparseHisto * GetChannelSparseHisto(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim=0)
Int_t GetDDLfromBus(Int_t busPatchId) const
AliMUONVStore * fManuValues
the manu store
virtual Int_t ExternalDimension() const =0
The number of dimensions we are inputting.
AliMUONTrackerData(const char *name="", const char *title="", Int_t dimension=0, Bool_t issingleevent=kFALSE)
virtual TObject * FindObject(const char *name) const
Find an object by name.
Bool_t fIsPCBLevelEnabled
whether we allow storing of PCB values (fPCBValues)
virtual Double_t ValueAsDoubleFast(Int_t i, Int_t j=0) const
virtual void SetValueAsDouble(Int_t i, Int_t j, Double_t value)
AliMUONVCalibParam * PCBParam(Int_t detElemId, Int_t pcbIndex, Bool_t create=kFALSE) const
Bool_t fIsChannelLevelEnabled
whether we allow storing of channel (fChannelValues) values