--- eventviewer/flight/src/FEVdetector.cpp 2006/07/14 14:18:04 1.1 +++ eventviewer/flight/src/FEVdetector.cpp 2007/02/26 12:51:09 1.10 @@ -86,6 +86,7 @@ var.SHOWDEC = 0; var.TOF = 0; var.AC = 0; + var.RUN = 1; var.TRK = 0; var.CALO = 0; var.S4 = 0; @@ -122,20 +123,24 @@ }; } +void FEVdetector::SetDDEC(TString de){ + ddec=de; +}; + void FEVdetector::GetWindow(){ otr->GetEntry(maxevent); if ( level.file < 2 ){ ph = eh->GetPscuHeader(); lastevno = (int)ph->Counter; } else { - lastevno = oinfoL2->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! + lastevno = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! }; otr->GetEntry(minevent); if ( level.file < 2 ){ ph = eh->GetPscuHeader(); firstevno = (int)ph->Counter; } else { - firstevno = oinfoL2->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! + firstevno = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! }; } @@ -161,6 +166,7 @@ void FEVdetector::GetEntry(Int_t i){ thisentry = i; otr->GetEntry(i); + // PrintData(otr,-1LL,44); } void FEVdetector::SetEntry(Int_t i){ @@ -173,7 +179,7 @@ return((int)ph->Counter); } else { // return(thisentry); // to be changed as soon as we will have pkt_counter in the level2 file! - return((int)oinfoL2->pkt_num); // to be changed as soon as we will have pkt_counter in the level2 file! + return((int)L2->GetOrbitalInfo()->pkt_num); // to be changed as soon as we will have pkt_counter in the level2 file! }; } @@ -281,6 +287,159 @@ }; } +void FEVdetector::PrintLeaves(TTree *otr, Int_t i, TBranchElement *tb, Int_t lenmax){ + // -- Prints values of leaves. + + // tb->ValidateAddress(); + printf("son qua \n"); + + // if (otr->GetMakeClass()) { + if (!tb->GetAddress()) { + printf("esco \n"); + return; + } + if (tb->GetType() == 3 || tb->GetType() == 4) { + // TClonesArray or STL container top-level branch. + printf("3 o 4 %-15s = %d\n", tb->GetName(), tb->GetNdata()); + return; + } else if (tb->GetType() == 31 || tb->GetType() == 41) { + printf(" 31 o 41 \n"); + // TClonesArray or STL container sub-branch. + Int_t n = TMath::Min(10, tb->GetNdata()); + Int_t atype = tb->GetStreamerType() + 20; + if (tb->GetStreamerType() == 1) { + // TVirtualStreamerInfo::kOffsetL + TVirtualStreamerInfo::kChar is + // printed as a string and could print weird characters. + // So we print an unsigned char instead (not perfect, but better). + atype = 20 + 11 ; + } + if (atype > 54) { + // FIXME: More logic required here (like in ReadLeaves) + printf(">54 %-15s = %d\n", tb->GetName(), tb->GetNdata()); + return; + } + if (tb->GetStreamerType() > 20) { + atype -= 20; + TObjArray *prova= otr->GetListOfLeaves(); + // TObjArray* leaf2 = (TObjArray*) prova->UncheckedAt(i); + //TLeaf* leaf = (TLeaf*)(otr->GetLeaf(tb->GetName())); + // TLeafElement* leaf = (TLeafElement*)((TLeaf*)(otr->GetListOfLeaves()->UncheckedAt(i))->GetBranch()->UncheckedAt(0)); + TLeafElement* leaf = (TLeafElement*)(prova->UncheckedAt(0)); + n = n * leaf->GetLenStatic(); + } + if (tb->GetInfo()) { + // n = 16; + tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); + //tb->GetObject()->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), atype, n, lenmax); + } + return; + } else if (tb->GetType() <= 2) { + printf(" <=2 \n"); + // Branch in split mode. + // FIXME: This should probably be < 60 instead. + if ((tb->GetStreamerType() > 40) && (tb->GetStreamerType() < 55)) { + Int_t atype = tb->GetStreamerType() - 20; + TBranchElement* counterElement = (TBranchElement*) tb->GetBranchCount(); + Int_t n = (Int_t) counterElement->GetValue(0, 0); + if (tb->GetInfo()) { + tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); + } + } else { + // if (tb->GetInfo()) { + // tb->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), tb->GetID(), -1, lenmax); + // } + // } + return; + } + } else if (tb->GetType() == 3) { + printf("3 %-15s = %d\n", tb->GetName(), tb->GetNdata()); + } else if (tb->GetType() == 31) { + printf("31 %-15s = %d\n", tb->GetName(), tb->GetNdata()); + // TClonesArray* clones = (TClonesArray*) tb->GetObject(); + // if (tb->GetInfo()) { + // tb->GetInfo()->PrintValueClones(tb->GetName(), clones, tb->GetID(), tb->GetOffset(), lenmax); + // } + } else if (tb->GetType() == 41) { + printf("41 %-15s = %d\n", tb->GetName(), tb->GetNdata()); + // TVirtualCollectionProxy::TPushPop helper(((TBranchElement*) this)->GetCollectionProxy(), fObject); + // if (GetInfo()) { + // GetInfo()->PrintValueSTL(GetName(), ((TBranchElement*) this)->GetCollectionProxy(), fID, fOffset, lenmax); + // } + } else { + printf("else %-15s = %d\n", tb->GetName(), tb->GetNdata()); + // if (GetInfo()) { + // GetInfo()->PrintValue(GetName(), fObject, fID, -1, lenmax); + // } + } + + // }; + printf("esco qui\n"); +}; + +void FEVdetector::PrintData(TTree *tree, Long64_t entry=-1LL,Int_t lenmax=44){ + // -- Print values of all active leaves for entry. + // + // if entry==-1, print current entry (default) + // if a leaf is an array, a maximum of lenmax elements is printed. + // + if (entry != -1) { + tree->GetEntry(entry); + } + // printf("======> EVENT:%lld\n", thisentry); + printf("======> EVENT:%i\n", thisentry); + TObjArray* leaves = tree->GetListOfLeaves(); // + Int_t nleaves = leaves->GetEntriesFast(); + Int_t ltype; + for (Int_t i = 0; i < nleaves; i++) { + TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(i); + TBranch* branch = leaf->GetBranch(); + // if (branch->TestBit(kDoNotProcess)) { + // continue; + // } + Int_t len = leaf->GetLen(); + if (len <= 0) { + continue; + } + len = TMath::Min(len, lenmax); + if (leaf->IsA() == TLeafElement::Class()) { + // Double_t value = leaf->GetValue(lenmax); + //printf(" ioqui %f \n",value); + // ((TBranchElement*)leaf->GetBranch())->PrintValue(i); + this->PrintLeaves(otr,i,((TBranchElement*)leaf->GetBranch()), lenmax); + //leaf->PrintValue(lenmax); + continue; + } + if (branch->GetListOfBranches()->GetEntriesFast() > 0) { + continue; + } + ltype = 10; + if (leaf->IsA() == TLeafF::Class()) { + ltype = 5; + } + if (leaf->IsA() == TLeafD::Class()) { + ltype = 5; + } + if (leaf->IsA() == TLeafC::Class()) { + len = 1; + ltype = 5; + }; + printf(" %-15s = ", leaf->GetName()); + for (Int_t l = 0; l < len; l++) { + Double_t value = leaf->GetValue(l); + printf(" ioqui %f \n",value); + // leaf->PrintValue(l); + if (l == (len - 1)) { + printf("\n"); + continue; + } + printf(", "); + if ((l % ltype) == 0) { + printf("\n "); + } + } + } +}; + void FEVdetector::GetGeneralInfo(){ // // Get Orbital Time information and header event number @@ -326,8 +485,8 @@ trcs = (TString)trc.str().c_str(); } else { headcold = headc; - headc = oinfoL2->pkt_num; // to be changed as soon as we will have obt in the level2 file! - OBT = oinfoL2->OBT; // to be changed as soon as we will have obt in the level2 file! + headc = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have obt in the level2 file! + OBT = L2->GetOrbitalInfo()->OBT; // to be changed as soon as we will have obt in the level2 file! DOBT = OBT - OOBT; OOBT = OBT; if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; @@ -336,18 +495,18 @@ // who gave the trigger? // calotrig = 0; - if ( L2->patterntrig[0] ) calotrig = 1; + if ( L2->GetTrigLevel2()->patterntrig[0] ) calotrig = 1; toftrig = 0; - if ( L2->patterntrig[2] || L2->patterntrig[3] || L2->patterntrig[4] || L2->patterntrig[5] ) toftrig = 1; + if ( L2->GetTrigLevel2()->patterntrig[2] || L2->GetTrigLevel2()->patterntrig[3] || L2->GetTrigLevel2()->patterntrig[4] || L2->GetTrigLevel2()->patterntrig[5] ) toftrig = 1; s4pulser = 0; - if ( L2->patterntrig[1] & (1<<0) ) s4pulser = 1; + if ( L2->GetTrigLevel2()->patterntrig[1] & (1<<0) ) s4pulser = 1; // // TOF and calorimeter when giving a trigger will always set this flag since the time window of the signal is greater than 100 ns. // S4 sometimes could not set the flag even if the trigger is given. This is a workaround to fix this "bug": // if ( !calotrig && !toftrig ) s4pulser = 1; // - Int_t trigconf = L2->trigconf; + Int_t trigconf = L2->GetTrigLevel2()->trigconf; stringstream trc; trc.str(""); if ( trigconf & (1<<0) ) trc << "TOF1"; @@ -469,13 +628,17 @@ // } -void FEVdetector::Load(TTree &mainotr, TFile &mainfile){ +Int_t FEVdetector::Load(TTree &mainotr, TFile &mainfile){ file = &mainfile; otr = &mainotr; L2 = new PamLevel2(); // if ( level.file == 2 ){ - otr = L2->LoadPamTrees(file); + // otr = L2->LoadPamTrees(file); + // printf(" %s \n",ddec.Data()); + otr = L2->GetPamTree(file,ddec.Data()); + // + if ( !otr ) return(0); // ******************** // load magnetic field // ******************** @@ -483,10 +646,11 @@ // stringstream magfie; magfie.str(""); + // magfie << "/localdisk/mocchiut/test/calib/trk-param/field_param-0/"; magfie << pam_calib; magfie << "/trk-param/field_param-0/"; // - L2->LoadField(magfie.str().c_str()); + L2->GetTrkLevel2()->LoadField(magfie.str().c_str()); } else { // // load calorimeter ADC2MIP conversion file @@ -526,12 +690,11 @@ // }; // - // trigger = new pamela::trigger::TriggerEvent(); eh = new pamela::EventHeader(); ph = new pamela::PscuHeader(); - oinfoL2 = new OrbitalInfo(); + // oinfoL2 = new OrbitalInfo(); runinfo = new ItoRunInfo(file); // de = new pamela::calorimeter::CalorimeterEvent(); @@ -545,9 +708,9 @@ otr->SetBranchAddress("Trigger", &trigger); otr->SetBranchAddress("Header", &eh); }; - if ( level.file == 2 ){ - otr->AddFriend("OrbitalInfo", file); - otr->SetBranchAddress("OrbitalInfo", &oinfoL2); + if ( level.file == 2 && var.RUN){ + // otr->AddFriend("OrbitalInfo", file); + // otr->SetBranchAddress("OrbitalInfo", &oinfoL2); runinfo->Read(0ULL); }; // @@ -621,6 +784,8 @@ printf("Show the Time of Flight detector, LEVEL2 data \n"); }; }; + // + return(1); // } @@ -815,6 +980,7 @@ // // SHOW PALETTE // + thefigure->cd(); if ( var.PALETTE ) ShowPalette(); // // SHOW VERBOSE INFOS @@ -2021,7 +2187,8 @@ ms11b[i] = 0.; } else { ms11b[i] = 1.; - }; }; + }; + }; for ( Int_t i = 0; i<6; i++ ) { mt12[0][i] = tof->tdc[ch12a[i]][hb12a[i]]; mt12[1][i] = tof->tdc[ch12b[i]][hb12b[i]]; @@ -2120,7 +2287,7 @@ // var.tofraw = 0; // - repuntil = L2->ToFLevel2::ntrk(); + if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); // printf("repuntil = %i \n",repuntil); //repuntil = L2->GetNTracks(); // @@ -2135,14 +2302,14 @@ // if ( repuntil == 1 || var.tofraw ){ numtr = 0; - ptt = L2->GetToFTrkVar(0); + ptt = L2->GetToFLevel2()->GetToFTrkVar(0); repeat = false; } else { // // if ( numtr >= repuntil-1 ) repeat = false; // - ptt = L2->GetToFTrkVar(numtr); + ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); }; // xp11[0] = 0.; @@ -2158,7 +2325,7 @@ // Float_t adc[4][12]; Float_t tdc[4][12]; - L2->GetMatrix(numtr,adc,tdc); + L2->GetToFLevel2()->GetMatrix(numtr,adc,tdc); // for ( Int_t i = 0; i<8; i++ ) { @@ -2168,7 +2335,7 @@ if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ ms11b[i] = adc[ch11b[i]][hb11b[i]]; }; - xp11[i] = 0.; + // xp11[i] = 0.; }; Int_t nmtof = 0; @@ -2208,6 +2375,7 @@ if ( adc[ch12b[i]][hb12b[i]] < 1000. ) ms12b[i] = adc[ch12b[i]][hb12b[i]]; xp12[i] = 0.; }; + // xp12[0] = ptt->xtofpos[0]; // ii = 2; @@ -2215,7 +2383,7 @@ ii--; if ( adc[ch21a[i]][hb21a[i]] < 1000. ) ms21a[ii] = adc[ch21a[i]][hb21a[i]]; if ( adc[ch21b[i]][hb21b[i]] < 1000. ) ms21b[ii] = adc[ch21b[i]][hb21b[i]]; - xp12[i] = 0.; + xp21[i] = 0.; }; xp21[0] = ptt->xtofpos[1]; // @@ -2801,10 +2969,10 @@ // full infos from ac // if ( level.file == 2 ){ - hitmapA = L2->hitmap[0]; - hitmapB = L2->hitmap[1]; - hitstatusA = L2->hitstatus[0]; - hitstatusB = L2->hitstatus[1]; + hitmapA = L2->GetAcLevel2()->hitmap[0]; + hitmapB = L2->GetAcLevel2()->hitmap[1]; + hitstatusA = L2->GetAcLevel2()->hitstatus[0]; + hitstatusB = L2->GetAcLevel2()->hitstatus[1]; }; // // @@ -4061,7 +4229,7 @@ // if ( level.file == 2 ){ for ( Int_t j = 0; j<3; j++ ) { - if ( L2->S4adc != 32. ) ms4[j] = L2->S4calibrated; + if ( L2->GetS4Level2()->S4adc != 32. ) ms4[j] = L2->GetS4Level2()->S4calibrated; }; }; // @@ -4146,9 +4314,9 @@ }; }; if ( level.file == 2 ){ - yUpperTrig = (Int_t)L2->trigPhysics; - yUpperBk = (Int_t)L2->upperBack; - yBottomBk = (Int_t)L2->bottomBack; + yUpperTrig = (Int_t)L2->GetNDLevel2()->trigPhysics; + yUpperBk = (Int_t)L2->GetNDLevel2()->upperBack; + yBottomBk = (Int_t)L2->GetNDLevel2()->bottomBack; }; // var.trup = yUpperTrig; @@ -4455,8 +4623,8 @@ // // singlets X // - for (Int_t sing = 0; sing < L2->nclsx(); sing++){ - TClonesArray &t = *(L2->SingletX); + for (Int_t sing = 0; sing < L2->GetTrkLevel2()->nclsx(); sing++){ + TClonesArray &t = *(L2->GetTrkLevel2()->SingletX); TrkSinglet *singlet = (TrkSinglet*)t[sing]; x = (singlet->coord[0]+singlet->coord[1])/2.; // @@ -4480,8 +4648,8 @@ // // singlets Y // - for (Int_t sing = 0; sing < L2->nclsy(); sing++){ - TClonesArray &t = *(L2->SingletY); + for (Int_t sing = 0; sing < L2->GetTrkLevel2()->nclsy(); sing++){ + TClonesArray &t = *(L2->GetTrkLevel2()->SingletY); TrkSinglet *singlet = (TrkSinglet*)t[sing]; // Int_t planepad = (singlet->plane - 1)* 2; @@ -4526,9 +4694,10 @@ dcol = 2; }; // - if ( L2->GetNTracks() > 0 ){ - for (Int_t nt = 0; nt < L2->GetNTracks(); nt++){ - TrkTrack *track = L2->GetTrack(nt); + if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ + for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ + PamTrack *ptrack= L2->GetTrack(nt); + TrkTrack *track = ptrack->GetTrkTrack(); if ( nt == 0 ){ var.rig = 0.; if ( track->al[4] != 0. ) var.rig = 1./track->al[4]; @@ -4624,9 +4793,9 @@ // // first of all plot crosses relatives to tracks // - if ( L2->GetNTracks() > 0 ){ - for (Int_t nt = 0; nt < L2->GetNTracks(); nt++){ - TrkTrack *track = L2->GetTrack(nt); + if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ + for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ + TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); for (Int_t plane = 0; plane<6; plane++){ // x = track->xm[plane]; @@ -4672,7 +4841,7 @@ // // try to plot crosses relative to singlets // - if ( L2->nclsx() > 0 && L2->nclsy() > 0 ){ + if ( L2->GetTrkLevel2()->nclsx() > 0 && L2->GetTrkLevel2()->nclsy() > 0 ){ for (Int_t plane = 1; plane<7; plane++){ // // count how many singlet in the x and y view for this plane: @@ -4686,8 +4855,8 @@ TArrayF *array2 = new TArrayF(5000); TArrayF *sigarrax = new TArrayF(5000); TArrayF *sigarray = new TArrayF(5000); - for (Int_t sing = 0; sing < L2->nclsx(); sing++){ - TClonesArray &t = *(L2->SingletX); + for (Int_t sing = 0; sing < L2->GetTrkLevel2()->nclsx(); sing++){ + TClonesArray &t = *(L2->GetTrkLevel2()->SingletX); TrkSinglet *singlet = (TrkSinglet*)t[sing]; if ( singlet->plane == plane ){ arrax->AddAt(((singlet->coord[0]+singlet->coord[1])/2.),totsx); @@ -4716,8 +4885,8 @@ totsx++; }; }; - for (Int_t sing = 0; sing < L2->nclsy(); sing++){ - TClonesArray &t = *(L2->SingletY); + for (Int_t sing = 0; sing < L2->GetTrkLevel2()->nclsy(); sing++){ + TClonesArray &t = *(L2->GetTrkLevel2()->SingletY); TrkSinglet *singlet = (TrkSinglet*)t[sing]; if ( singlet->plane == plane ){ array1->AddAt(singlet->coord[0],totsy); @@ -4942,11 +5111,109 @@ // // // + if ( var.CALO && false ){ + if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ + Float_t calx[22]; + Float_t caly[22]; + Float_t calzx[22]; + Float_t calzy[22]; + Float_t zpiano[22]; + zpiano[0] = (CTZ+118.)*var.sfy/1000.; + for (Int_t plane = 1; plane < 22; plane++){ + if ( !(plane%2) ){ + zpiano[plane] = zpiano[plane-1] - 8.09*var.sfy/1000.; + }else { + zpiano[plane] = zpiano[plane-1] - 10.09*var.sfy/1000.; + }; + }; + for (Int_t plane = 0; plane < 22; plane++){ + calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; + caly[plane] = (L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; + // calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; + calzx[plane] = zpiano[plane] + var.yxvc; + calzy[plane] = zpiano[plane] + var.yyvc; + // printf(" calx %f caly %f calzx %f calzy %f \n",calx[plane],caly[plane],calzx[plane],calzy[plane]); + }; + // + // Calorimeter track + // + Int_t trcol = 30; + if ( var.bw ){ + trcol = 14; + } else { + trcol = 44; + }; + thefigure->cd(); + TPolyLine *trakx = new TPolyLine(22,calx,calzx); + trakx->SetLineColor(trcol); + if ( L2->GetCaloLevel2()->fitmode[0] == 1 ) trakx->SetLineStyle(3); + if ( L2->GetCaloLevel2()->fitmode[0] == 2 ) trakx->SetLineStyle(4); + trakx->SetLineWidth(2); + trakx->Draw(); + TPolyLine *traky = new TPolyLine(22,caly,calzy); + traky->SetLineColor(trcol); + if ( L2->GetCaloLevel2()->fitmode[1] == 1 ) traky->SetLineStyle(3); + if ( L2->GetCaloLevel2()->fitmode[1] == 2 ) traky->SetLineStyle(4); + traky->SetLineWidth(2); + traky->Draw(); + }; + if ( L2->GetCaloLevel2()->npcfit[2] > 0 ){ + Float_t calx[22]; + Float_t caly[22]; + Float_t calzx[22]; + Float_t calzy[22]; + Float_t zpiano[22]; + zpiano[0] = (CTZ+118.)*var.sfy/1000.; + for (Int_t plane = 1; plane < 22; plane++){ + if ( !(plane%2) ){ + zpiano[plane] = zpiano[plane-1] - 8.09*var.sfy/1000.; + }else { + zpiano[plane] = zpiano[plane-1] - 10.09*var.sfy/1000.; + }; + }; + // + // + CaloTrkVar *ctra = L2->GetCaloStoredTrack(-1); + // + for (Int_t plane = 0; plane < 22; plane++){ + calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; + caly[plane] = (ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; + // calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; + calzx[plane] = zpiano[plane] + var.yxvc; + calzy[plane] = zpiano[plane] + var.yyvc; + // printf(" calx %f caly %f calzx %f calzy %f \n",calx[plane],caly[plane],calzx[plane],calzy[plane]); + }; + // + // Calorimeter track + // + Int_t trcol = 30; + if ( var.bw ){ + trcol = 16; + } else { + trcol = 46; + }; + thefigure->cd(); + TPolyLine *trakx = new TPolyLine(22,calx,calzx); + trakx->SetLineColor(trcol); + trakx->SetLineStyle(3); + trakx->SetLineWidth(2); + trakx->Draw(); + TPolyLine *traky = new TPolyLine(22,caly,calzy); + traky->SetLineColor(trcol); + traky->SetLineStyle(3); + traky->SetLineWidth(2); + traky->Draw(); + }; + }; + // if ( !var.TRK || level.file != 2 ) return; // - if ( L2->GetNTracks() > 0 ){ - for (Int_t nt = 0; nt < L2->GetNTracks(); nt++){ - TrkTrack *track = L2->GetTrack(nt); + if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ + for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ + + // TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); + PamTrack *ptrack = L2->GetTrack(nt); + TrkTrack *track = ptrack->GetTrkTrack(); Int_t npoint = 100; Float_t zin[100]; Double_t xout[100]; @@ -5016,6 +5283,7 @@ }; tzx[e] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; tzy[e] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; + // printf("tx[e] %f ty [e] %f tzx %f tzy %f \n",tx[e],ty[e],tzx[e],tzy[e]); }; // // From S1 to CALO @@ -5565,12 +5833,12 @@ // stringstream xvev; stringstream yvev; - for (Int_t ii = 0; ii < L2->nstrip; ii++){ + for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ Int_t colo; Int_t l; Int_t m; Int_t n; - Float_t mip = L2->DecodeEstrip(ii,l,m,n); + Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n); if ( var.bw ){ colo = -1; } else { @@ -5604,8 +5872,8 @@ }; pd1->Update(); pd2->Update(); - var.qtot=(int)L2->qtot; - var.nstrip=(int)L2->nstrip; + var.qtot=(int)L2->GetCaloLevel2()->qtot; + var.nstrip=(int)L2->GetCaloLevel2()->nstrip; }; }