22 cout<<
"cwb_report_prod_1.C starts..."<<endl;
40 gStyle->SetTitleOffset(1.4,
"X");
41 gStyle->SetTitleOffset(1.2,
"Y");
42 gStyle->SetLabelOffset(0.014,
"X");
43 gStyle->SetLabelOffset(0.010,
"Y");
44 gStyle->SetLabelFont(42,
"X");
45 gStyle->SetLabelFont(42,
"Y");
46 gStyle->SetTitleFont(42,
"X");
47 gStyle->SetTitleFont(42,
"Y");
48 gStyle->SetLabelSize(0.04,
"X");
49 gStyle->SetLabelSize(0.04,
"Y");
51 gStyle->SetTitleH(0.050);
52 gStyle->SetTitleW(0.95);
53 gStyle->SetTitleY(0.98);
54 gStyle->SetTitleFont(12,
"D");
55 gStyle->SetTitleColor(kBlue,
"D");
56 gStyle->SetTextFont(12);
57 gStyle->SetTitleFillColor(kWhite);
58 gStyle->SetLineColor(kWhite);
59 gStyle->SetNumberContours(256);
60 gStyle->SetCanvasColor(kWhite);
61 gStyle->SetStatBorderSize(1);
62 gStyle->SetOptStat(kFALSE);
65 gStyle->SetFrameBorderMode(0);
68 cout<<
"netplot starts..."<<endl;
80 TCanvas *
c1 =
new TCanvas(
"c",
"C",0,0,600,600);
87 c1->SetRightMargin(0.1517039);
88 c1->SetTopMargin(0.0772727);
89 c1->SetBottomMargin(0.103939);
92 TColor::InitializeColors();
98 TColor::CreateGradientColorTable(nRGBs, stops, red, green, blue, 255);
100 TChain
wave(
"waveburst");
101 TChain
live(
"liveTime");
120 cout <<
"cwb_report_prod_1.C Error : Leaf " << veto_name
121 <<
" is not present in tree" << endl;
126 gSystem->Exec(
"date");
135 W.GetEntry(0); sTARt = W.gps[0];
139 if(
int(
k/100000)*100000 ==
k) cout <<
"processed: " <<
k <<endl;
140 if(W.gps[0]>sTOp) {sTOp = W.gps[0];}
141 if(W.gps[0]<sTARt) {sTARt = W.gps[0];}
145 T_bgn-=(T_end-
T_bgn)/100.;
146 T_end+=(T_end-
T_bgn)/100.;
151 cout <<
"cwb_report_prod_1.C - File open error : " << fname << endl;
154 fprintf(ftrig,
"#Start\tStop\n");
155 fprintf(ftrig,
"%d\t%d\n",(
int)T_bgn,(
int)T_end);
157 sprintf(fname,
"Red dots vetoed CAT3 or hveto");
160 rho_T->SetTitleOffset(1.3,
"Y");
161 rho_T->GetXaxis()->SetTitle(fname);
162 rho_T->GetXaxis()->SetTimeDisplay(1);
163 rho_T->GetYaxis()->SetTitle(
"#rho");
164 rho_T->SetMarkerStyle(20);
165 rho_T->SetMarkerColor(1);
166 rho_T->SetMarkerSize(0.8);
167 rho_T->SetStats(kFALSE);
170 rho_T2->SetTitle(
"Red dots vetoed CAT3 or hveto");
171 rho_T2->GetXaxis()->SetTitle(fname);
172 rho_T2->GetXaxis()->SetTimeDisplay(1);
173 rho_T2->GetYaxis()->SetTitle(
"#rho");
174 rho_T2->SetMarkerStyle(20);
175 rho_T2->SetMarkerColor(2);
176 rho_T2->SetMarkerSize(0.8);
177 rho_T2->SetStats(kFALSE);
180 c1 =
new TCanvas(
"c",
"C",0,0,800,600);
181 c1->SetBorderMode(0);
183 c1->SetBorderSize(2);
186 c1->SetBottomMargin(0.143939);
187 c1->SetRightMargin(0.1517039);
188 c1->SetTopMargin(0.0772727);
192 ff->SetTitleOffset(1.3,
"Y");
194 ff->GetXaxis()->SetTitle(
"frequency, Hz");
195 ff->SetStats(kFALSE);
200 ff->GetYaxis()->SetTitle(
"#rho(ECOR)");
203 c1->Update(); c1->SaveAs(fname);
206 sprintf(ch1,
"rho[0]:frequency[0]>>ff");
208 ff->GetYaxis()->SetTitle(
"#rho(ecor)");
211 cout << fname << endl;
212 c1->Update(); c1->SaveAs(fname);
219 ff->SetTitle(
"after pp-cuts (loudest not vetoed : black)");
220 ff->GetYaxis()->SetTitle(
"#rho");
221 ff->GetXaxis()->SetMoreLogLabels(kTRUE);
222 ff->GetXaxis()->SetNoExponent(kTRUE);
228 int sel_size =
wave.GetSelectedRows();
229 double* sel_rho =
wave.GetV1();
230 double* sel_freq =
wave.GetV2();
231 double* sel_entry =
wave.GetV3();
232 Int_t *
_index =
new Int_t[sel_size];
233 TMath::Sort(sel_size,sel_rho,_index,
true);
240 for(
int n=0;n<nbranch;++
n) {
241 TBranch *br =
dynamic_cast<TBranch*
>(
wave.GetListOfBranches()->At(n));
242 if(
TString(br->GetName()).Contains(
"veto_")) {
244 if(!
TString(br->GetName()).Contains(
"veto_cat2")) {
245 VETO_NAME[nveto] = br->GetName();
246 wave.SetBranchAddress(br->GetName(),&VETO[nveto++]);
250 for(
int i=0;
i<sel_size;
i++) {
252 int j=
int(sel_entry[l]);
255 for(
int k=0;
k<nveto;
k++) {
257 if(VETO[
k] && VETO_NAME[
k].Contains(
"veto_cat3")) veto=
true;
260 if(VETO[
k] && VETO_NAME[
k].Contains(
"veto_hveto")) veto=
true;
263 if(VETO[
k] && VETO_NAME[
k].Contains(
"veto_user")) veto=
true;
268 TMarker *mP =
new TMarker(sel_freq[l], sel_rho[l], 20);
269 mP->SetMarkerSize(0.9);
270 mP->SetMarkerColor(kBlack);
275 c1->Update(); c1->SaveAs(fname);
287 rho_T->SetTitle(
"after pp-cuts (black), vetoed by cat3 or hveto (red)");
290 rho_T->SetTitle(
"after pp-cuts");
293 c1->Update(); c1->Print(fname);
void Export(TString fname="")
void Import(TString umacro="")
fprintf(ftrig,"#Start\top\)
sprintf(fname,"%s/time.txt", netdir)
char veto_not_vetoed[1024]
void SetSingleDetectorMode()