00001
00002
00003
00004 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TCnaParameters.h"
00005
00006 ClassImp(TCnaParameters)
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 TCnaParameters::~TCnaParameters()
00037 {
00038
00039
00040 }
00041
00042
00043
00044
00045
00046
00047 TCnaParameters::TCnaParameters()
00048 {
00049 Init();
00050 }
00051
00052 void TCnaParameters::Init()
00053 {
00054 fgMaxCar = (Int_t)512;
00055 }
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 void TCnaParameters::SetPeriodTitles()
00069 {
00070
00071
00072 fPeriod2002 = "Test beam 2002. Module M0'";
00073
00074 fPeriod2003 = "Test beam during 2003: SM0 and SM1";
00075
00076 fPeriod2004_1 = "29 May - 08 June 2004: first period with E0'";
00077 fPeriod2004_2 = "08 - 22 June 2004: second period with E0'";
00078 fPeriod2004_3 = "27 June - 07 July 2004: third period with E0'";
00079 fPeriod2004_4 = "21 July - 05 August 2004: fourth period with E0'";
00080 fPeriod2004_5 = "02 - 06 Sept 2004: fifth period with E0'";
00081 fPeriod2004_6 = "05 Oct - 16 Nov: Test beam 2004 supermodule SM10 ";
00082
00083 fPeriod2005 = "Cosmic ray test in H4";
00084 fPeriod2006_1 = "Cosmic ray test in H4";
00085 fPeriod2006_2 = "Test beam CMS/ECAL";
00086
00087 }
00088
00089 TString TCnaParameters::PeriodOfRun(const Int_t& run_number)
00090 {
00091
00092
00093
00094 TString chperiod;
00095 Int_t MaxCar = fgMaxCar;
00096 chperiod.Resize(MaxCar);
00097 chperiod = "(no period info)";
00098
00099
00100 if ( run_number >= 50000 && run_number < 59999 )
00101 {chperiod = fPeriod2002;}
00102
00103 if ( run_number >= 60000 && run_number < 68050 )
00104 {chperiod = fPeriod2003;}
00105
00106
00107 if ( run_number >= 68051 && run_number < 69055 )
00108 {chperiod = fPeriod2004_1;}
00109
00110 if ( run_number >= 69056 && run_number < 70299 )
00111 {chperiod = fPeriod2004_2;}
00112
00113 if ( run_number >= 70300 && run_number < 71332 )
00114 {chperiod = fPeriod2004_3;}
00115
00116 if ( run_number >= 71333 && run_number < 72188 )
00117 {chperiod = fPeriod2004_4;}
00118
00119 if ( run_number >= 72189 && run_number < 72744 )
00120 {chperiod = fPeriod2004_5;}
00121
00122 if ( run_number >= 72745 && run_number < 9999999 )
00123 {chperiod = fPeriod2004_6;}
00124
00125
00126
00127
00128
00129 if ( run_number > 0 )
00130 {chperiod = fPeriod2006_2;}
00131
00132 return chperiod;
00133 }
00134
00135
00136
00137
00138
00139 Int_t TCnaParameters::GetCodePrint(const TString chcode)
00140 {
00141
00142
00143 Int_t code_print = 101;
00144
00145
00146
00147 if( chcode == "NoComment" ){code_print = 100;}
00148 if( chcode == "Warnings" ){code_print = 101;}
00149 if( chcode == "Comments" ){code_print = 102;}
00150 if( chcode == "AllComments" ){code_print = 103;}
00151
00152 return code_print;
00153 }