FEDRA emulsion software from the OPERA Collaboration
link.C File Reference

Functions

int cut_seg (float x0, float y0, float tx0, float ty0, float puls)
 
void link ()
 

Variables

EdbPVRecali =0
 

Function Documentation

◆ cut_seg()

int cut_seg ( float  x0,
float  y0,
float  tx0,
float  ty0,
float  puls 
)
5{
6 // this function is called by GetDataEdb() to reject bad segments
7
8 // if( TMath::Abs(ty0)>.15 ) return 0;
9 if( puls < 3 ) return 0;
10 if( TMath::Abs(y0- 139.70)<1.35 && TMath::Abs(x0+ 64.45)<1.4 ) return 0;
11 if( TMath::Abs(y0+ 158.2 )<1.3 && TMath::Abs(x0+ 108.55)<1.3 ) return 0;
12 if( TMath::Abs(y0- 139.38)<1.5 && TMath::Abs(x0+ 44.95)<1.5 ) return 0;
13 if( TMath::Abs(y0+ 121.30)<1.35 && TMath::Abs(x0- 104.45)<1.35) return 0;
14 if( TMath::Abs(y0+ 13.90)<1.45 && TMath::Abs(x0- 118.50)<1.35) return 0;
15 if( TMath::Abs(y0+ 143.75)<1.35 && TMath::Abs(x0- 133.25)<1.35) return 0;
16 return 1;
17}

◆ link()

void link ( )
21{
22 gROOT->LoadMacro("ScanCond.C");
23 gROOT->LoadMacro("IO.C");
24
25 EdbRun *edbRun = new EdbRun(
26 "/mnt/nusrv4_2/week/scan1.root"
27 //"/mnt/operalabdb_e/data/rawr/b1_sep2002/Pl02/Sep2002_pl2_1.root"
28 //"/mnt/operalabdb_e/data/rawr/b1_jun2003/pl09/raw_Jun2003_03010109_nc1.root"
29 ,"READ");
30
31 // up base down - nominal values during exposure (up/down are used for projection only)
32 float plate[3] = {40, 214, 40}; // we do not rely yet on values coming after convertor
33
34 float shrU = 1.12; // (exposure thickness) / (measured on stage thickness):
35 float shrD = .98; // tx_exp = tx_stage/shr
36
37 float uOff[2] = {0.,0.}; // s1.eTX-s.eTX, s1.eTY-s.eTY (at 0 angle)
38 float dOff[2] = {0.,0.}; // s2.eTX-s.eTX, -(s2.eTY-s.eTY)
39
40 TTree *tree = inittree("couples",
41 "link.root",
42 "RECREATE"); // "RECREATE" "NEW" or "UPDATE" open modes
43
47
48 TIndexCell uplist;
49 TIndexCell downlist;
50
51 make_views_coord_map(edbRun,uplist,downlist);
52 //make_views_map(edbRun,uplist,downlist);
53
54 int nareas= uplist->N(1);
55
56 TIndexCell *up=0;
57 TIndexCell *down=0;
58
59 //for(int aid=1; aid<11; aid++) {
60 for(int aid=0; aid<nareas+1; aid++) {
61
62 up = uplist.Find(aid); if(!up) continue;
63 down = downlist.Find(aid); if(!down) continue;
64
65 ali = new EdbPVRec();
67
68 getDataEdb( edbRun, ali, up,down, shrU, shrD, uOff, dOff, plate );
69
70 ali->GetScanCond()->Print();
72
74 ali->SetChi2Max(2.5);
75 ali->Link();
76
77 filltree(tree, ali,0);
78 delete pvol;
79 delete ali;
80 }
81
82}
void make_views_coord_map(EdbRun *edbRun, TIndexCell &up, TIndexCell &down)
Definition: IO.C:28
void filltree(TTree *tree, EdbPVRec *al, int fillraw=0)
Definition: IO.C:455
void Set_Prototype_OPERA_microtrack(EdbScanCond *cond)
Definition: ScanCond.C:30
void inittree()
Definition: aln.cpp:84
EdbScanCond * scanCond
Definition: aln.cpp:16
void getDataEdb(EdbRun &edbRun, int aid, float shr, EdbPVRec *pvol)
Definition: aln.cpp:30
Definition: EdbPVRec.h:148
void SetSegmentsErrors()
Definition: EdbPVRec.cxx:1129
EdbScanCond const * GetScanCond()
Definition: EdbPVRec.h:172
void SetChi2Max(float chi)
Definition: EdbPVRec.h:186
void SetCouplesAll()
Definition: EdbPVRec.cxx:975
int Link()
Definition: EdbPVRec.cxx:1187
void SetScanCond(EdbScanCond *scan)
Definition: EdbPVRec.h:171
Definition: EdbPattern.h:334
Definition: EdbRun.h:75
Definition: EdbScanCond.h:10
void Print() const
Definition: EdbScanCond.cxx:50
sort collection with attributes
Definition: TIndexCell.h:19
TIndexCell * Find(Int_t narg, Long_t varg[]) const
Definition: TIndexCell.cpp:613
Int_t N() const
Definition: TIndexCell.cpp:344
Int_t plate
Definition: merge_Energy_SytematicSources_Electron.C:1

Variable Documentation

◆ ali

EdbPVRec* ali =0