![]() |
AliPhysics
bba8f44 (bba8f44)
|
HV recalculation. More...
#include <signal.h>
#include <stdio.h>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <iosfwd>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <map>
#include <utility>
#include <iterator>
#include <TSystem.h>
#include <TApplication.h>
#include <TChain.h>
#include <TF1.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TFile.h>
#include <TCanvas.h>
#include <TFrame.h>
#include <TPostScript.h>
#include <TLine.h>
#include <TGaxis.h>
#include <TStyle.h>
#include <TGraphErrors.h>
#include <TMath.h>
#include <TMatrixF.h>
#include <TText.h>
Go to the source code of this file.
Namespaces | |
std | |
Enumerations | |
enum | detType { kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird, kEMCAL, kEMCALthird, kDCAL, kDCALthird } |
Functions | |
void | CalcNewHVperSM (TString hvFileName, TString paramFileName, int smNb, char *fchNameBase, FILE *outFile, FILE *badGainFileOut, double coeffOCDB[kNbSMtot][kNbColMax][kNbRowMax], double coeffCalib[kNbSMtot][kNbColMax][kNbRowMax], double forcedGainChange[kNbSMtot][kNbColMax][kNbRowMax], double forcedOCDBcoeff[kNbSMtot][kNbColMax][kNbRowMax], int flag[kNbSMtot][kNbColMax][kNbRowMax], TPostScript *ps, TCanvas *c1) |
void | HVrecalculation (TString ident, int choiceArg=0b0100) |
Variables | |
const double | kMaxHV = 395. |
const double | kMinHV = 210. |
const double | coefFactorWanted =0.0162 |
char | SMP2Name [][100] ={"SMA0","SMC0","SMA1","SMC1","SMA2","SMC2","SMA3","SMC3","SMA4","SMC4","SMA5","SMC5","SMA9","SMC9","SMA10","SMC10","SMA11","SMC11","SMA12","SMC12"} |
char | SMcalibName [][100] ={"US2","US1","EU2","EU1","US3","US5","US4","EU3","US7","US6","US8C0","US8C2","DCN1","DJP1","DUS2","DUS1","DJP2","DUS3","CN1A","CN1C"} |
char | SMnumber [][100] ={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"} |
int | detTypeType [] ={kEMCAL,kEMCALthird,kDCAL,kDCALthird} |
char | detTypeString [][100] ={"EMCAL","EMCALthird","DCAL","DCALthird"} |
int | SMdetType [] ={kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCALthird,kEMCALthird,kDCAL,kDCAL,kDCAL,kDCAL,kDCAL,kDCAL,kDCALthird,kDCALthird} |
const int | kNbColEMCAL =48 |
const int | kNbRowEMCAL =24 |
const int | kNbSMEMCAL =10 |
const int | kNbColEMCALthird =kNbColEMCAL |
const int | kNbRowEMCALthird =(int)(kNbRowEMCAL/3) |
const int | kNbSMEMCALthird =2 |
const int | kNbColDCAL =32 |
const int | kNbRowDCAL =kNbRowEMCAL |
const int | kNbSMDCAL =6 |
const int | kNbColDCALthird =kNbColEMCALthird |
const int | kNbRowDCALthird =kNbRowEMCALthird |
const int | kNbSMDCALthird =2 |
const int | kNbSMtot =kNbSMEMCAL+kNbSMEMCALthird+kNbSMDCAL+kNbSMDCALthird |
const int | kTabNbCol [4] ={kNbColEMCAL,kNbColEMCALthird,kNbColDCAL,kNbColDCALthird} |
const int | kTabNbRow [4] ={kNbRowEMCAL,kNbRowEMCALthird,kNbRowDCAL,kNbRowDCALthird} |
const int | kTabNbSM [4] ={kNbSMEMCAL,kNbSMEMCALthird,kNbSMDCAL,kNbSMDCALthird} |
const int | kNbColMax =kNbColEMCAL |
const int | kNbRowMax =kNbRowEMCAL |
const int | kNbColOffsetDCAL =kNbColEMCAL-kNbColDCAL |
int | lastSM |
HV recalculation.
HV recalculation
How to run : Customize fchNameBadGainIn, then run :
root -b -q 'macros/HVrecalculation.C++("ident")'
Stored in the "badGain file" : SM col row choice gain1 gain2 gain3 OCDBcoeff "choice" is 1, 2 or 3 ; gain1 = default value calculated by the program ; gain2 = gain 1.000 (no HV change) ; gain3 = a value to be set in the file by the user. Choice 4 [obsolete] = same as choice 3 (picks up the 3rd gain value) but is used as a tag to recognize values copy-pasted by the code from a pass to the next one (as opposed to manual setting of the choice by hand in the file). Choices 11, 12, 13 : same as 1, 2, 3, except that they've been copied from the "badGainIn" file. Choice -3 = force take gain3 and OCDBcoeff. Choice 000 = bad HV scan not detected by the code.
This code reads HV's for year N-1, OCDB coeffs for year N-1 from pi0 calibration, (p0,p1,p2) parameters from a recent HV scan, and calculates HV's for year N (to come) with associated OCDB coeffs (most often 0.0162).
Mapping convention :
Definition in file HVrecalculation.C.
enum detType |
Definition at line 55 of file HVrecalculation.C.
void CalcNewHVperSM | ( | TString | hvFileName, |
TString | paramFileName, | ||
int | smNb, | ||
char * | fchNameBase, | ||
FILE * | outFile, | ||
FILE * | badGainFileOut, | ||
double | coeffOCDB[kNbSMtot][kNbColMax][kNbRowMax], | ||
double | coeffCalib[kNbSMtot][kNbColMax][kNbRowMax], | ||
double | forcedGainChange[kNbSMtot][kNbColMax][kNbRowMax], | ||
double | forcedOCDBcoeff[kNbSMtot][kNbColMax][kNbRowMax], | ||
int | flag[kNbSMtot][kNbColMax][kNbRowMax], | ||
TPostScript * | ps, | ||
TCanvas * | c1 | ||
) |
void HVrecalculation | ( | TString | ident, |
int | choiceArg = 0b0100 |
||
) |
Main method
choiceArg | indicates which SM are used : 10^0 = EMCAL, 10^1 = EMCAL thirds, 10^2 = DCAL, 10^3 = DCAL thirds, 0 = no, 1 = yes. Therefore : old EMCAL SMs only -> choiceArg = 0b0001 ; thirds only -> choiceArg = 0b1010 ; DCAL only -> choiceArg = 0b0100. Caution, do not write eg '0001', because integers with a leading zero in C are interpreted as octal values. Instead, write '0b0001' to state it's binary. |
Definition at line 560 of file HVrecalculation.C.
const double coefFactorWanted =0.0162 |
Definition at line 47 of file HVrecalculation.C.
Referenced by CalcNewHVperSM().
char detTypeString[][100] ={"EMCAL","EMCALthird","DCAL","DCALthird"} |
Definition at line 57 of file HVrecalculation.C.
Referenced by CalcNewHVperSM(), and HVrecalculation().
int detTypeType[] ={kEMCAL,kEMCALthird,kDCAL,kDCALthird} |
Definition at line 56 of file HVrecalculation.C.
const double kMaxHV = 395. |
Definition at line 45 of file HVrecalculation.C.
Referenced by CalcNewHVperSM().
const double kMinHV = 210. |
Definition at line 46 of file HVrecalculation.C.
Referenced by CalcNewHVperSM().
const int kNbColDCAL =32 |
Definition at line 65 of file HVrecalculation.C.
const int kNbColDCALthird =kNbColEMCALthird |
Definition at line 68 of file HVrecalculation.C.
const int kNbColEMCAL =48 |
Definition at line 59 of file HVrecalculation.C.
const int kNbColEMCALthird =kNbColEMCAL |
Definition at line 62 of file HVrecalculation.C.
const int kNbColMax =kNbColEMCAL |
Definition at line 75 of file HVrecalculation.C.
Referenced by CalcNewHVperSM(), and HVrecalculation().
const int kNbColOffsetDCAL =kNbColEMCAL-kNbColDCAL |
Definition at line 77 of file HVrecalculation.C.
const int kNbRowDCAL =kNbRowEMCAL |
Definition at line 66 of file HVrecalculation.C.
const int kNbRowDCALthird =kNbRowEMCALthird |
Definition at line 69 of file HVrecalculation.C.
const int kNbRowEMCAL =24 |
Definition at line 60 of file HVrecalculation.C.
const int kNbRowEMCALthird =(int)(kNbRowEMCAL/3) |
Definition at line 63 of file HVrecalculation.C.
const int kNbRowMax =kNbRowEMCAL |
Definition at line 76 of file HVrecalculation.C.
Referenced by CalcNewHVperSM(), and HVrecalculation().
const int kNbSMDCAL =6 |
Definition at line 67 of file HVrecalculation.C.
Referenced by HVrecalculation().
const int kNbSMDCALthird =2 |
Definition at line 70 of file HVrecalculation.C.
const int kNbSMEMCAL =10 |
Definition at line 61 of file HVrecalculation.C.
Referenced by HVrecalculation().
const int kNbSMEMCALthird =2 |
Definition at line 64 of file HVrecalculation.C.
Referenced by HVrecalculation().
const int kNbSMtot =kNbSMEMCAL+kNbSMEMCALthird+kNbSMDCAL+kNbSMDCALthird |
Definition at line 71 of file HVrecalculation.C.
Referenced by HVrecalculation().
const int kTabNbCol[4] ={kNbColEMCAL,kNbColEMCALthird,kNbColDCAL,kNbColDCALthird} |
Definition at line 72 of file HVrecalculation.C.
const int kTabNbRow[4] ={kNbRowEMCAL,kNbRowEMCALthird,kNbRowDCAL,kNbRowDCALthird} |
Definition at line 73 of file HVrecalculation.C.
const int kTabNbSM[4] ={kNbSMEMCAL,kNbSMEMCALthird,kNbSMDCAL,kNbSMDCALthird} |
Definition at line 74 of file HVrecalculation.C.
int lastSM |
Definition at line 79 of file HVrecalculation.C.
char SMcalibName[][100] ={"US2","US1","EU2","EU1","US3","US5","US4","EU3","US7","US6","US8C0","US8C2","DCN1","DJP1","DUS2","DUS1","DJP2","DUS3","CN1A","CN1C"} |
Definition at line 52 of file HVrecalculation.C.
Referenced by HVrecalculation().
int SMdetType[] ={kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCAL,kEMCALthird,kEMCALthird,kDCAL,kDCAL,kDCAL,kDCAL,kDCAL,kDCAL,kDCALthird,kDCALthird} |
Definition at line 58 of file HVrecalculation.C.
Referenced by CalcNewHVperSM(), and HVrecalculation().
char SMnumber[][100] ={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"} |
Definition at line 53 of file HVrecalculation.C.
Referenced by HVrecalculation().
char SMP2Name[][100] ={"SMA0","SMC0","SMA1","SMC1","SMA2","SMC2","SMA3","SMC3","SMA4","SMC4","SMA5","SMC5","SMA9","SMC9","SMA10","SMC10","SMA11","SMC11","SMA12","SMC12"} |
Definition at line 51 of file HVrecalculation.C.
Referenced by CalcNewHVperSM(), and HVrecalculation().