2{
3 TH2F*
h1=
new TH2F(
"h1",
"h1",100,-.1,.1,100,-.1,.1);
5
6 TFile *
f = TFile::Open(fnam);
7 tree=(TTree*)
f->Get(
"couples");
8
9 int nentr = int(tree->GetEntries());
10
11 float xoff = -61000.;
12 float yoff = 58000.;
13
16 TClonesArray *as = 0;
17 TClonesArray *as1 = 0;
18 TClonesArray *as2 = 0;
19 Int_t nseg;
20 Float_t dx_top,dy_top,dx_bot,dy_bot;
21 tree->SetBranchAddress(
"s." , &
s );
22 tree->SetBranchAddress(
"s1." , &
s1 );
23 tree->SetBranchAddress(
"s2." , &
s2 );
24 tree->SetBranchAddress(
"cp" , &
cp );
25 for(int i=0;i<nentr;i++)
26 {
27 tree->GetEntry(i);
32 {
33 dx_top=
s->TX()-
s1->
TX();
34 dx_bot=
s->TX()-
s2->
TX();
35 dy_top=
s->TY()-
s1->
TY();
36 dy_bot=
s->TY()-
s2->
TY();
37 addarrow(ctop,
s->X()-xoff,
s->Y()-yoff,dx_top,dy_top,kRed);
38 addarrow(ctop,
s->X()-xoff,
s->Y()-yoff,dx_bot,dy_bot,kBlue);
39
40
41 }
42 addarrow(ctop,-11600.,-11600.,.1,0.,kBlack);
43
44 }
45
46}
FILE * f
Definition: RecDispMC.C:150
Expr< UnaryOp< Fabs< T >, Expr< A, T, D >, T >, T, D > fabs(const Expr< A, T, D > &rhs)
Definition: UnaryOperators.hh:96
Definition: EdbSegCouple.h:17
float CHI2P() const
Definition: EdbSegCouple.h:62
int N1() const
Definition: EdbSegCouple.h:57
int N2() const
Definition: EdbSegCouple.h:58
Float_t TX() const
tangens = deltaX/deltaZ
Definition: EdbSegP.h:175
Float_t TY() const
tangens = deltaY/deltaZ
Definition: EdbSegP.h:176
s
Definition: check_shower.C:55
void addarrow(TCanvas *c, Float_t x, Float_t y, Float_t dx, Float_t dy, int color)
Definition: distor.C:48
TH1F * h1
Definition: energy.C:16
EdbSegP * s1
Definition: tlg2couples.C:29
EdbSegP * s2
Definition: tlg2couples.C:30
EdbSegCouple * cp
Definition: tlg2couples.C:28