1 #if !defined(__CINT__) || defined(__MAKECINT__) 2 #include <AliEMCALGeometry.h> 4 #include <TClonesArray.h> 5 #include <TClonesArray.h> 40 TCalInfo() : fRunNo(0), fAvTime(0), fFirstTime(0), fLastTime(0), fMinT(0), fMaxT(0), fFracS(0), fAvgTemp(160), fFracLed(20), fFracMon(20), fCells(
"TCalCell") {}
66 cerr <<
"No time objects for period " << period << endl;
71 cerr <<
"No led objects for period " << period << endl;
75 const Int_t rns=la->GetEntries();
76 cout <<
"Working on period " << period <<
" with " << rns <<
" runs" << endl;
78 AliEMCALGeometry *g=AliEMCALGeometry::GetInstance(
"EMCAL_COMPLETE12SMV1_DCAL_8SM");
79 const Int_t kSM=g->GetNumberOfSuperModules();
80 const Int_t kNcells=g->GetNCells();
84 TFile *out = TFile::Open(ofile,
"recreate");
85 out->SetCompressionLevel(9);
86 TTree* fTree =
new TTree(
"tcal",
"Temp calibration tree");
87 fTree->SetDirectory(out);
88 fTree->Branch(
"event", &info, 32000, 99);
90 TClonesArray &carr = info->
fCells;
93 for (
Int_t i=0;i<rns;++i) {
96 LInfo *linfo =
dynamic_cast<LInfo*
>(la->At(l));
98 cout <<
"skipping due to missing info in LED tree!" << endl;
102 TInfo *tinfo =
dynamic_cast<TInfo*
>(ta->At(t));
104 cout <<
"skipping due to missing info in temp tree!" << endl;
116 cout <<
" Run numbers differ, skipping " << runl <<
" " << runt << endl;
119 cout <<
"Working on run " << runl << endl;
128 for (
Int_t sm=0; sm<kSM; ++sm) {
132 for (
Int_t n=0; n<160; ++n) {
138 carr.ExpandCreate(kNcells);
141 for (
Int_t sm=0; sm<kSM; ++sm) {
142 avg[sm]=tinfo->
AvgT(sm);
145 for (
Int_t sm=0; sm<kSM; ++sm) {
146 Int_t nrow = g->GetNumberOfCellsInPhiDirection(sm);
147 Int_t ncol = g->GetNumberOfCellsInEtaDirection(sm);
154 for (
Int_t col=0; col<ncol; ++col) {
155 for (
Int_t row=0; row<nrow; ++row) {
156 Int_t id = g->GetAbsCellIdFromCellIndexes(sm,row,col);
163 cell->
fLedM = hledm->GetBinContent(hledm->FindBin(col,row));
164 cell->
fLedR = hledr->GetBinContent(hledr->FindBin(col,row));
165 cell->
fMonM = hmonm->GetBinContent(hmonm->FindBin(col/2));
166 cell->
fMonR = hmonr->GetBinContent(hmonr->FindBin(col/2));
167 cell->
fLocT = tinfo->
T(ns,3);
168 cell->
fSMT = avg[sm];
Double_t FracLeds(Int_t sm, Int_t gain=1) const
UInt_t GetLastTime() const
UInt_t GetAverageTime() const
TH1 * GetLedMonRmsHist(Int_t sm, Int_t gain=1) const
Float_t AbsMaxT(Int_t t=2) const
TH1 * GetLedMonHist(Int_t sm, Int_t gain=1) const
Double_t FracStrips(Int_t sm, Int_t gain=1) const
TH2 * GetLedRmsHist(Int_t sm, Int_t gain=1) const
UInt_t GetFirstTime() const
static Int_t SensId(Int_t sm, Int_t row, Int_t col)
Float_t T(Int_t ns, Int_t t) const
Float_t AbsMinT(Int_t t=1) const
Double_t Fraction() const
Float_t AvgT(Int_t sm) const
TH2 * GetLedHist(Int_t sm, Int_t gain=1) const
void createTree(const char *period, const char *ofile="treeout.root", Bool_t doprint=0)