4 cout<<
"cwb_report_prod_1.C starts..."<<endl;
22 gStyle->SetTitleOffset(1.4,
"X");
23 gStyle->SetTitleOffset(1.2,
"Y");
24 gStyle->SetLabelOffset(0.014,
"X");
25 gStyle->SetLabelOffset(0.010,
"Y");
26 gStyle->SetLabelFont(42,
"X");
27 gStyle->SetLabelFont(42,
"Y");
28 gStyle->SetTitleFont(42,
"X");
29 gStyle->SetTitleFont(42,
"Y");
30 gStyle->SetLabelSize(0.04,
"X");
31 gStyle->SetLabelSize(0.04,
"Y");
33 gStyle->SetTitleH(0.050);
34 gStyle->SetTitleW(0.95);
35 gStyle->SetTitleY(0.98);
36 gStyle->SetTitleFont(12,
"D");
37 gStyle->SetTitleColor(kBlue,
"D");
38 gStyle->SetTextFont(12);
39 gStyle->SetTitleFillColor(kWhite);
40 gStyle->SetLineColor(kWhite);
41 gStyle->SetNumberContours(256);
42 gStyle->SetCanvasColor(kWhite);
43 gStyle->SetStatBorderSize(1);
44 gStyle->SetOptStat(kFALSE);
47 gStyle->SetFrameBorderMode(0);
50 cout<<
"netplot starts..."<<endl;
62 TCanvas *
c1 =
new TCanvas(
"c",
"C",0,0,600,600);
69 c1->SetRightMargin(0.1517039);
70 c1->SetTopMargin(0.0772727);
71 c1->SetBottomMargin(0.103939);
74 TColor::InitializeColors();
80 TColor::CreateGradientColorTable(nRGBs, stops, red, green, blue, 255);
82 TChain
wave(
"waveburst");
83 TChain
live(
"liveTime");
102 cout <<
"cwb_report_prod_1.C Error : Leaf " << veto_name
103 <<
" is not present in tree" << endl;
108 gSystem->Exec(
"date");
117 W.GetEntry(0); sTARt = W.gps[0];
121 if(
int(
k/100000)*100000 ==
k) cout <<
"processed: " <<
k <<endl;
122 if(W.gps[0]>sTOp) {sTOp = W.gps[0];}
123 if(W.gps[0]<sTARt) {sTARt = W.gps[0];}
127 T_bgn-=(T_end-
T_bgn)/100.;
128 T_end+=(T_end-
T_bgn)/100.;
133 cout <<
"cwb_report_prod_1.C - File open error : " << fname << endl;
136 fprintf(ftrig,
"#Start\tStop\n");
137 fprintf(ftrig,
"%d\t%d\n",(
int)T_bgn,(
int)T_end);
139 sprintf(fname,
"Red dots vetoed CAT3 or hveto");
142 rho_T->SetTitleOffset(1.3,
"Y");
143 rho_T->GetXaxis()->SetTitle(fname);
144 rho_T->GetXaxis()->SetTimeDisplay(1);
145 rho_T->GetYaxis()->SetTitle(
"#rho");
146 rho_T->SetMarkerStyle(20);
147 rho_T->SetMarkerColor(1);
148 rho_T->SetMarkerSize(0.8);
149 rho_T->SetStats(kFALSE);
152 rho_T2->SetTitle(
"Red dots vetoed CAT3 or hveto");
153 rho_T2->GetXaxis()->SetTitle(fname);
154 rho_T2->GetXaxis()->SetTimeDisplay(1);
155 rho_T2->GetYaxis()->SetTitle(
"#rho");
156 rho_T2->SetMarkerStyle(20);
157 rho_T2->SetMarkerColor(2);
158 rho_T2->SetMarkerSize(0.8);
159 rho_T2->SetStats(kFALSE);
162 c1 =
new TCanvas(
"c",
"C",0,0,800,600);
163 c1->SetBorderMode(0);
165 c1->SetBorderSize(2);
168 c1->SetBottomMargin(0.143939);
169 c1->SetRightMargin(0.1517039);
170 c1->SetTopMargin(0.0772727);
174 ff->SetTitleOffset(1.3,
"Y");
176 ff->GetXaxis()->SetTitle(
"frequency, Hz");
177 ff->SetStats(kFALSE);
182 ff->GetYaxis()->SetTitle(
"#rho(ECOR)");
185 c1->Update(); c1->SaveAs(fname);
188 sprintf(ch1,
"rho[0]:frequency[0]>>ff");
190 ff->GetYaxis()->SetTitle(
"#rho(ecor)");
193 cout << fname << endl;
194 c1->Update(); c1->SaveAs(fname);
201 ff->SetTitle(
"after pp-cuts (loudest not vetoed : black)");
202 ff->GetYaxis()->SetTitle(
"#rho");
203 ff->GetXaxis()->SetMoreLogLabels(kTRUE);
204 ff->GetXaxis()->SetNoExponent(kTRUE);
210 int sel_size =
wave.GetSelectedRows();
211 double* sel_rho =
wave.GetV1();
212 double* sel_freq =
wave.GetV2();
213 double* sel_entry =
wave.GetV3();
214 Int_t *_index =
new Int_t[sel_size];
215 TMath::Sort(sel_size,sel_rho,_index,
true);
222 for(
int n=0;n<nbranch;++
n) {
223 TBranch *br =
dynamic_cast<TBranch*
>(
wave.GetListOfBranches()->At(n));
224 if(
TString(br->GetName()).Contains(
"veto_")) {
226 if(!
TString(br->GetName()).Contains(
"veto_cat2")) {
227 VETO_NAME[nveto] = br->GetName();
228 wave.SetBranchAddress(br->GetName(),&VETO[nveto++]);
232 for(
int i=0;
i<sel_size;
i++) {
234 int j=
int(sel_entry[l]);
237 for(
int k=0;
k<nveto;
k++) {
239 if(VETO[
k] && VETO_NAME[
k].Contains(
"veto_cat3")) veto=
true;
242 if(VETO[
k] && VETO_NAME[
k].Contains(
"veto_hveto")) veto=
true;
245 if(VETO[
k] && VETO_NAME[
k].Contains(
"veto_user")) veto=
true;
250 TMarker *mP =
new TMarker(sel_freq[l], sel_rho[l], 20);
251 mP->SetMarkerSize(0.9);
252 mP->SetMarkerColor(kBlack);
257 c1->Update(); c1->SaveAs(fname);
269 rho_T->SetTitle(
"after pp-cuts (black), vetoed by cat3 or hveto (red)");
272 rho_T->SetTitle(
"after pp-cuts");
275 c1->Update(); c1->Print(fname);
void Export(TString fname="")
void Import(TString umacro="")
fprintf(ftrig,"#Start\tStop\n")
sprintf(fname,"%s/time.txt", netdir)
char veto_not_vetoed[1024]
void SetSingleDetectorMode()