source: trunk/Mars/fact/processing/swtrig.C@ 19674

Last change on this file since 19674 was 18936, checked in by Daniela Dorner, 7 years ago
added more values for artificial trigger rate
File size: 2.1 KB
Line 
1int swtrig(const char *fname)
2{
3 gEnv->GetValue("TFile.Recover", 0);
4 TChain c("Events");
5 if (c.AddFile(fname, 0)!=1)
6 {
7 gLog << "ERROR - Number of added files does not match 1." << endl;
8 return 1;
9 }
10
11 c.SetAlias("Baseline", "MSoftwareTrigger.fBaseline");
12 c.SetAlias("Signal", "MSoftwareTrigger.fAmplitude");
13 c.SetAlias("ID", "(0xff00&MRawEvtHeader.fTrigPattern[0])");
14 c.SetAlias("DATA", "ID==0x000");
15 c.SetAlias("CAL", "ID==0x100");
16 c.SetAlias("PED", "ID==0x400");
17 c.SetAlias("SELECT", "Baseline < (Signal/1000)^1.5+75");
18
19 Long64_t cnt27s = c.Draw("Signal", "!SELECT && DATA", "goff");
20
21 Long64_t cnt00050 = c.Draw("Signal", "SELECT && DATA && (Signal>50)", "goff");
22 Long64_t cnt00100 = c.Draw("Signal", "SELECT && DATA && (Signal>100)", "goff");
23 Long64_t cnt00200 = c.Draw("Signal", "SELECT && DATA && (Signal>200)", "goff");
24 Long64_t cnt00350 = c.Draw("Signal", "SELECT && DATA && (Signal>350)", "goff");
25 Long64_t cnt00500 = c.Draw("Signal", "SELECT && DATA && (Signal>500)", "goff");
26 Long64_t cnt00750 = c.Draw("Signal", "SELECT && DATA && (Signal>750)", "goff");
27 Long64_t cnt01000 = c.Draw("Signal", "SELECT && DATA && (Signal>1000)", "goff");
28 Long64_t cnt01250 = c.Draw("Signal", "SELECT && DATA && (Signal>1250)", "goff");
29 Long64_t cnt02500 = c.Draw("Signal", "SELECT && DATA && (Signal>2500)", "goff");
30 Long64_t cnt05000 = c.Draw("Signal", "SELECT && DATA && (Signal>5000)", "goff");
31 Long64_t cnt10000 = c.Draw("Signal", "SELECT && DATA && (Signal>10000)", "goff");
32 Long64_t cnt20000 = c.Draw("Signal", "SELECT && DATA && (Signal>20000)", "goff");
33
34 cout << "result ";
35 cout << cnt27s << ' ';
36 cout << cnt00050 << ' ';
37 cout << cnt00100 << ' ';
38 cout << cnt00200 << ' ';
39 cout << cnt00350 << ' ';
40 cout << cnt00500 << ' ';
41 cout << cnt00750 << ' ';
42 cout << cnt01000 << ' ';
43 cout << cnt01250 << ' ';
44 cout << cnt02500 << ' ';
45 cout << cnt05000 << ' ';
46 cout << cnt10000 << ' ';
47 cout << cnt20000 << endl;
48
49 return 0;
50}
Note: See TracBrowser for help on using the repository browser.