20 #include "AliCodeTimer.h"
42 #include <Riostream.h>
45 #include <TObjArray.h>
46 #include <TObjString.h>
48 #include <TTimeStamp.h>
71 #define PRECISION 1E-12
73 Double_t Difference(Double_t v1, Double_t v2)
76 return TMath::Abs(d) <
PRECISION ? 0.0 : d;
79 Double_t AbsoluteDifference(Double_t v1, Double_t v2)
81 return TMath::Abs(Difference(v1,v2));
85 Double_t RelativeDifference(Double_t v1, Double_t v2)
87 if ( TMath::Abs(v1) <
PRECISION )
return 0.0;
91 Double_t AbsoluteRelativeDifference(Double_t v1, Double_t v2)
93 return TMath::Abs(RelativeDifference(v1,v2));
100 Bool_t issingleevent)
102 fIsSingleEvent(issingleevent),
105 fBusPatchValues(0x0),
109 fDimension(External2Internal(dimension)+fgkExtraDimension),
111 fDimensionNames(new
TObjArray(fDimension+fgkVirtualExtraDimension)),
112 fExternalDimensionNames(new
TObjArray(dimension)),
113 fExternalDimension(dimension),
114 fHistogramming(new Int_t[fExternalDimension]),
118 fIsChannelLevelEnabled(kTRUE),
119 fIsManuLevelEnabled(kTRUE),
120 fIsBustPatchLevelEnabled(kTRUE),
121 fIsPCBLevelEnabled(kTRUE),
123 fNofEventsPerDDL(0x0)
139 fIsSingleEvent(kFALSE),
142 fBusPatchValues(0x0),
148 fDimensionNames(0x0),
149 fExternalDimensionNames(0x0),
150 fExternalDimension(0),
155 fIsChannelLevelEnabled(kFALSE),
156 fIsManuLevelEnabled(kTRUE),
157 fIsBustPatchLevelEnabled(kTRUE),
158 fIsPCBLevelEnabled(kTRUE),
160 fNofEventsPerDDL(0x0)
168 AliFatal(
"Cannot create a tracker data from nothing in that case !");
173 AliError(
"Cannot work without (full) mapping");
196 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
202 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
204 Int_t detElemId, manuId;
223 Int_t mid =
GetParts(wec,chamber,de,busPatch,pcb,manu,channel,mpde);
227 AliError(Form(
"Something is wrong for DE %5d : manuId = %d vs mid = %d",detElemId,manuId,mid));
233 AliError(
"Got a < 0 manuId. Should not happen here !");
237 assert(channel==0x0);
243 AliError(Form(
"Incoherent number of manu channels for DE %5d MANU %5d : %d vs %d",
244 detElemId,manuId,n1,n2));
253 if ( nevents[ddl] == 0 )
259 if ( nevents.At(ddl) != nevt )
261 AliError(Form(
"Nevt mismatch for DE %5d MANU %5d DDL %d : %d vs %d",
262 detElemId,manuId,ddl,nevents.At(ddl),nevt));
267 for ( Int_t i = 0; i < wec->
Dimension()-1; ++i )
288 fIsSingleEvent(kFALSE),
291 fBusPatchValues(0x0),
297 fDimensionNames(0x0),
298 fExternalDimensionNames(0x0),
299 fExternalDimension(0),
304 fIsChannelLevelEnabled(kFALSE),
305 fIsManuLevelEnabled(kFALSE),
306 fIsBustPatchLevelEnabled(kFALSE),
307 fIsPCBLevelEnabled(kFALSE),
309 fNofEventsPerDDL(0x0)
317 AliFatal(
"Cannot create a tracker data from nothing in that case !");
322 AliError(
"Cannot work without (full) mapping");
336 AliFatal(
"Wrong parameter. Must be 1 or 2");
366 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
372 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
374 Int_t detElemId = external->
ID0();
380 AliError(Form(
"Got an invalid DE (%d) from external store",detElemId));
399 AliError(Form(
"Incoherent number of dimensions for DE%d : %d vs %d",
408 if ( nevents[ddl] == 0 )
414 if ( nevents.At(ddl) != nevt )
416 AliError(Form(
"Nevt mismatch for DE %5d DDL %d : %d vs %d",
417 detElemId,ddl,nevents.At(ddl),nevt));
422 for ( Int_t i = 0; i < wec->
Dimension()-1; ++i )
460 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
466 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
468 Int_t busPatchId = external->
ID0();
474 AliError(Form(
"Got an invalid buspatchId (%d) from external store",busPatchId));
495 AliError(Form(
"Incoherent number of dimensions for BP%d : %d vs %d",
504 if ( nevents[ddl] == 0 )
510 if ( nevents.At(ddl) != nevt )
512 AliError(Form(
"Nevt mismatch for BP %5d DDL %d : %d vs %d",
513 busPatchId,ddl,nevents.At(ddl),nevt));
518 for ( Int_t i = 0; i < wec->
Dimension()-1; ++i )
536 fIsSingleEvent(kFALSE),
539 fBusPatchValues(0x0),
543 fDimension(External2Internal(1)+fgkExtraDimension),
545 fDimensionNames(new
TObjArray(fDimension+fgkVirtualExtraDimension)),
546 fExternalDimensionNames(new
TObjArray(1)),
547 fExternalDimension(1),
548 fHistogramming(new Int_t[fExternalDimension]),
552 fIsChannelLevelEnabled(kTRUE),
553 fIsManuLevelEnabled(kTRUE),
554 fIsBustPatchLevelEnabled(kTRUE),
555 fIsPCBLevelEnabled(kFALSE),
557 fNofEventsPerDDL(0x0)
564 AliError(
"Cannot work without (full) mapping");
576 TArrayI nevents(AliDAQ::NumberOfDdls(
"MUONTRK"));
588 deit.
First(chamberId);
594 Int_t detElemId = mpde->
GetId();
600 for ( Int_t iBusPatch = 0; iBusPatch < mpde->
GetNofBusPatches(); ++iBusPatch )
610 for ( Int_t iManu = 0 ;iManu < mpbp->
GetNofManus(); ++iManu )
690 AliCodeTimerAuto(
"",0);
694 AliError(
"Incompatible IsChannelLevelEnabled status");
700 AliError(
"Incompatible IsManuLevelEnabled status");
706 AliError(
"Incompatible IsSingleEvent status");
712 AliError(
"Incompatible dimensions");
718 AliError(
"Incompatible number of Ddls");
725 AliError(Form(
"Incompatible histogramming (%p vs %p) (xmax = %e vs %e ; xmin = %e vs %e)",
736 AliError(Form(
"Incompatible histogramming for external dimension %d",i));
775 for ( Int_t i = 0; i <
fNofDDLs; ++i )
784 while ( ( store = static_cast<AliMUONVStore*>(nexthisto()) ) )
786 TIter ns(store->CreateIterator());
788 while ( ( h = static_cast<AliMUONSparseHisto*>(ns()) ) )
794 thisStore = store->
Create();
795 thisStore->SetUniqueID(store->GetUniqueID());
813 for ( Int_t i = 0 ; i <
fNofDDLs; ++i )
830 while ( ( p = static_cast<AliMUONVCalibParam*>(next()) ) )
836 dest.
Add(static_cast<AliMUONVCalibParam*>(p->Clone()));
854 while ( ( p = static_cast<AliMUONVCalibParam*>(next()) ) )
860 dest.
Add(static_cast<AliMUONVCalibParam*>(p->Clone()));
874 for ( Int_t i = 0; i < src.
Size(); ++i )
876 for ( Int_t j = 0; j < src.
Dimension(); ++j )
903 fNofDDLs = AliDAQ::NumberOfDdls(
"MUONTRK");
905 for ( Int_t i = 0; i <
fNofDDLs; ++i )
913 if (nevents->GetSize() !=
fNofDDLs )
915 AliError(Form(
"nof of ddl per event array size is incorrect : got %d, expecting %d",
920 for ( Int_t i = 0 ; i <
fNofDDLs; ++i )
928 for ( Int_t i = 0 ; i <
fNofDDLs; ++i )
945 Int_t numberOfBusPatches(0);
946 Int_t numberOfDEs(0);
957 while ( next() ) ++numberOfBusPatches;
993 AliCodeTimerAuto(GetName(),0);
997 AliError(Form(
"%s is supposed to be single event only",GetName()));
1012 while ( ( external = static_cast<AliMUONVCalibParam*>(next()) ) )
1016 AliError(Form(
"Incompatible dimensions %d vs %d",
1029 Int_t manuId =
GetParts(external,chamber,de,busPatch,pcb,manu,channel,mpde);
1031 if ( manuId < 0 )
continue;
1033 Int_t detElemId = mpde->
GetId();
1035 Double_t value[] = { 0.0, 0.0 };
1039 for ( Int_t i = 0; i < external->Size(); ++i )
1046 if ( existingChannel )
1048 Bool_t validChannel(kFALSE);
1050 for ( Int_t j = 0; j < external->Dimension(); ++j )
1052 Double_t vext = external->IsDoublePrecision() ?
1053 external->ValueAsDoubleFast(i,j) :
1054 external->ValueAsFloatFast(i,j);
1058 validChannel = kTRUE;
1063 value[1] = vext*vext;
1070 for ( Int_t k = 0; k < nk; ++k )
1164 AliCodeTimerAuto(
"",0);
1170 AliError(Form(
"Got an invalid buspatchId = %d",busPatchId));
1234 AliCodeTimerAuto(
"",0);
1244 it.
First(chamberId);
1272 Int_t manuChannel, Int_t dim)
const
1312 for ( Int_t i = 0; i <
fNofDDLs; ++i )
1324 const char* outnamebase,
1331 Double_t (*difffunction)(Double_t,Double_t)=0x0;
1332 TString suffix(
"unknown");
1336 difffunction = Difference;
1341 difffunction = AbsoluteDifference;
1346 difffunction = RelativeDifference;
1351 difffunction = AbsoluteRelativeDifference;
1357 outname.Form(
"%s:%s",outnamebase,suffix.Data());
1361 return CompareData(d1,d2,outname.Data(),difffunction);
1373 const char* outname,
1374 Double_t(*diff)(Double_t,Double_t))
1380 AliErrorClass(
"Cannot compare data of incompatible dimensions");
1385 Int_t detElemId, manuId;
1389 while ( it.
Next(detElemId,manuId) )
1412 Double_t d = diff(d1.
Channel(detElemId,manuId,i,k),
1413 d2.
Channel(detElemId,manuId,i,k));
1434 Int_t manuChannel)
const
1445 Int_t detElemId, Int_t manuId)
const
1449 AliCodeTimerAuto(
"",0);
1459 for ( Int_t i = 0; i < c->
Size(); ++i )
1461 Double_t value(0.0);
1506 AliCodeTimerAuto(
"",0);
1565 it.
First(chamberid);
1589 TObjString* value =
static_cast<TObjString*
>(
fDimensionNames->At(dim));
1592 return value->String();
1596 return TString(
"Invalid");
1640 return value->String();
1644 return TString(
"Invalid");
1651 Int_t dim, Double_t value)
1666 AliDebug(1,Form(
"DE %04d MANU %04d CH %02d dim %d value %e h %p",detElemId,manuId,manuChannel,dim,value,h));
1670 h->
Fill(static_cast<Int_t>(TMath::Nint(value)));
1703 m->SetUniqueID( ( manuId << 16 ) | detElemId );
1712 h->SetUniqueID(dim);
1723 Int_t manuChannel, Int_t dim)
const
1732 UInt_t uid = ( manuChannel << 16 ) | dim;
1742 Int_t manuChannel, Int_t dim)
1752 m->SetUniqueID( ( manuId << 16 ) | detElemId );
1756 UInt_t uid = ( manuChannel << 16 ) | dim;
1763 h->SetUniqueID(uid);
1774 Int_t& detElemId, Int_t& manuId)
const
1780 AliError(
"Could not access manu store from OCDB !");
1784 if ( param.
ID1() <= 0 )
1787 Int_t serial = param.
ID0();
1793 AliDebug(1,Form(
"DE %d manuId %d from serial %d is not correct !",
1794 detElemId,manuId,serial));
1800 detElemId = param.
ID0();
1801 manuId = param.
ID1();
1819 chamber = de = busPatch = pcb = manu = channel = 0x0;
1846 Int_t busPatchId = ddlStore->
GetBusPatchId(detElemId,manuId);
1848 if ( busPatchId <= 0 )
1853 Int_t pcbIndex = -1;
1868 manu =
ManuParam(detElemId,manuId,kTRUE);
1878 if ( pcbIndex >= 0 )
1880 pcb =
PCBParam(detElemId,pcbIndex,kTRUE);
1915 return (
ManuParam(detElemId,manuId) != 0 );
1923 return (
PCBParam(detElemId,pcbIndex) != 0 );
1960 AliCodeTimerAuto(
"",0);
1979 if (!list)
return 0;
1984 const TObject* o(0x0);
1986 while ( ( o = next() ) )
1991 AliError(Form(
"Object named %s is not an AliMUONTrackerData ! Skipping it",
1996 Bool_t ok =
Add(*data);
1999 AliError(
"Got incompatible objects");
2073 AliCodeTimerAuto(
"",0);
2095 for ( Int_t i = 0; i <
fNofDDLs; ++i )
2097 cout << Form(
"DDL %04d Nevents=%10d",AliDAQ::DdlID(
"MUONTRK",i),
fNofEventsPerDDL[i]) << endl;
2103 cout <<
"Is not storing data at the channel level" << endl;
2108 cout <<
"Is not storing data at the manu level" << endl;
2114 cout << Form(
"External Dimension %2d Name %s %s",i,
2115 ( name ? name->String().Data() :
"null"),
2122 cout << Form(
"Internal Dimension %2d Name %s",i,
2123 ( name ? name->String().Data() :
"null")) << endl;
2129 if ( sopt.Contains(
"CHANNEL") )
2137 AliWarning(
"You requested channel values, but they were not stored !");
2141 if ( sopt.Contains(
"MANU") )
2149 AliWarning(
"You requested manu values, but they were not stored !");
2178 AliError(Form(
"%s : dimension %s : Index out of bounds : %d / %d",
2188 const char*
prefix[] = {
"mean",
"sigma" };
2190 for ( Int_t i = 0; i < 2; ++i )
2216 AliWarning(Form(
"Will %s make histogram for data %s index %d : that might ressemble a memory leak depending on the input data",
2217 value ?
"":
"not", GetName(),index));
2230 AliError(Form(
"Index out of bounds : %d / %d",index,
fDimension));
2234 TObjString* ovalue =
static_cast<TObjString*
>(
fDimensionNames->At(index));
2268 Int_t dim, Int_t ddlId)
const
2287 if ( ddlId < 0 ) AliError(
"Got a negative ddl id !");
2297 Double_t x = value/occ;
2299 return ( TMath::Finite(x) ? x : 0.0 ) ;
2309 return TMath::Sqrt(TMath::Abs((value-nn*mean*mean)/(nn-1.0)));
2320 AliMUONTrackerData::Streamer(TBuffer &R__b)
2324 if (R__b.IsReading()) {
2325 AliMUONTrackerData::Class()->ReadBuffer(R__b,
this);
2334 for ( Int_t i = 0; i <
fNofDDLs; ++i )
2341 AliMUONTrackerData::Class()->WriteBuffer(R__b,
this);
2354 AliError(
"Mapping not loaded. Cannot work");
2360 AliError(
"No manu values. Cannot work");
2364 ofstream out(filename);
2368 AliError(Form(
"Cannot create file %s",filename));
2372 out <<
"//===========================================================================" << endl;
2373 out <<
"// Hit counter exported from $Id$" << endl;
2374 out <<
"//===========================================================================" << endl;
2375 out <<
"//" << endl;
2376 out <<
"// * Run Number : " << runNumber << endl;
2377 out <<
"// * File Creation Date : " << TTimeStamp().AsString(
"l") << endl;
2378 out <<
"//---------------------------------------------------------------------------" << endl;
2379 out <<
"// BP MANU SUM_N NEVENTS" << endl;
2380 out <<
"//---------------------------------------------------------------------------" << endl;
2385 while ( ( manu = static_cast<AliMUONVCalibParam*>(next()) ) )
2387 Int_t detElemId = manu->
ID0();
2388 Int_t manuId = manu->ID1();
2391 if ( busPatchId < 0 || ddl < 0 )
2393 AliError(Form(
"Got invalid (DE,manu,bp,ddl)=(%d,%d,%d,%d). Skipping it",detElemId,manuId,busPatchId,ddl));
2415 Double_t sumn = 1000.0;
2416 Double_t sumw = sumn*y;
2417 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