Line data Source code
1 : #ifndef ALIMUONBUSPATCHEVOLUTION_H
2 : #define ALIMUONBUSPATCHEVOLUTION_H
3 :
4 : /// \ingroup calib
5 : /// \class AliMUONBusPatchEvolution
6 : /// \brief Utility class to massage the output of the MCHBPEVO DA
7 : ///
8 : // Author Laurent Aphecetche, Subatech
9 :
10 : #ifndef ROOT_TObject
11 : # include "TObject.h"
12 : #endif
13 :
14 : #include <map>
15 : #include <vector>
16 : #include "TTimeStamp.h"
17 :
18 : class AliMergeableCollection;
19 : class TH1;
20 :
21 0 : class AliMUONBusPatchEvolution : public TObject
22 : {
23 : public:
24 :
25 : AliMUONBusPatchEvolution(AliMergeableCollection& hc);
26 : AliMUONBusPatchEvolution(AliMergeableCollection& hc, const std::map<int,int>& nofPadsPerBusPatch);
27 :
28 : void Augment();
29 :
30 : Bool_t GetFaultyBusPatches(int timeResolution,
31 : int requiredEvents,
32 : float occupancyThreshold,
33 : std::map<int,double>& faultyBusPatchOccupancies);
34 :
35 : void GetTimeResolutions(std::vector<int>& timeResolutions);
36 :
37 : void ShrinkTimeAxis();
38 :
39 : static TH1* ExpandTimeAxis(const TH1& h, Int_t expansionTime, Int_t timeResolution=-1);
40 :
41 : static Bool_t GetTimeOffset(const TH1& h, TTimeStamp& origin);
42 :
43 : private:
44 :
45 : void ComputeNumberOfPads();
46 :
47 : Bool_t FillNumberOfPads();
48 :
49 : static int GetTimeResolution(const TH1& h);
50 :
51 : void GroupByStation(int timeResolution);
52 : void GroupByChamber(int timeResolution);
53 : void GroupByDDL(int timeResolution);
54 : void GroupByDE(int timeResolution);
55 :
56 : void Normalize();
57 :
58 : void NumberOfPadsFromHistosToMap(std::map<int,int>& nofPadsPerBusPatch);
59 :
60 : private:
61 : AliMergeableCollection& fBPEVO;
62 : std::map<int,int> fNofPads;
63 :
64 18 : ClassDef(AliMUONBusPatchEvolution,1)
65 :
66 : };
67 :
68 : #endif
|