| 95 |
}; |
}; |
| 96 |
} |
} |
| 97 |
|
|
| 98 |
|
void CaloPreSampler::SplitInto(Int_t NoWpreSampler, Int_t NoWcalo){ |
| 99 |
|
this->SetNoWcalo(0); |
| 100 |
|
this->SetNoWpreSampler(0); |
| 101 |
|
if ( NoWpreSampler < NoWcalo ){ |
| 102 |
|
this->SetNoWpreSampler(NoWpreSampler); |
| 103 |
|
this->SetNoWcalo(NoWcalo); |
| 104 |
|
} else { |
| 105 |
|
this->SetNoWcalo(NoWcalo); |
| 106 |
|
this->SetNoWpreSampler(NoWpreSampler); |
| 107 |
|
}; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
void CaloPreSampler::Clear(){ |
void CaloPreSampler::Clear(){ |
| 111 |
// |
// |
| 112 |
pcalo->Clear(); |
pcalo->Clear(); |
| 150 |
return; |
return; |
| 151 |
}; |
}; |
| 152 |
// |
// |
| 153 |
|
// Clear structures used to communicate with fortran |
| 154 |
|
// |
| 155 |
|
event->ClearStructs();//ELENA |
| 156 |
|
// |
| 157 |
Bool_t newentry = false; |
Bool_t newentry = false; |
| 158 |
// |
// |
| 159 |
if ( L2->IsORB() ){ |
if ( L2->IsORB() ){ |
| 221 |
if ( nox && view == 0 ) mip = 0.; |
if ( nox && view == 0 ) mip = 0.; |
| 222 |
if ( noy && view == 1 ) mip = 0.; |
if ( noy && view == 1 ) mip = 0.; |
| 223 |
// |
// |
| 224 |
|
if ( emulate18 && view == 0 && plane == 18 ) mip = 0.; |
| 225 |
|
// |
| 226 |
// Selection mode: fill the matrix only for plane < (22 - N) REMEMBER N = number of W planes to be used as presampler, ie if N = 2 then we want to use planes from 0 to 19 |
// Selection mode: fill the matrix only for plane < (22 - N) REMEMBER N = number of W planes to be used as presampler, ie if N = 2 then we want to use planes from 0 to 19 |
| 227 |
// included so plane < (22 - 2) |
// included so plane < (22 - 2) |
| 228 |
// |
// |
| 510 |
if ( debug ) printf(" Selftrigger: problems with event \n"); |
if ( debug ) printf(" Selftrigger: problems with event \n"); |
| 511 |
}; |
}; |
| 512 |
}; |
}; |
| 513 |
// |
// // |
| 514 |
// Clear structures used to communicate with fortran |
// // Clear structures used to communicate with fortran |
| 515 |
// |
// // |
| 516 |
event->ClearStructs(); |
// event->ClearStructs(); |
| 517 |
|
// ELENA: moved @ beginning |
| 518 |
// |
// |
| 519 |
// |
// |
| 520 |
// |
// |
| 522 |
if ( debug ) printf(" exit \n"); |
if ( debug ) printf(" exit \n"); |
| 523 |
// |
// |
| 524 |
} |
} |
| 525 |
|
|
| 526 |
|
// |
| 527 |
|
// Method to add a calorimeter track, evaluated around a tracker track defined by a status vector. |
| 528 |
|
// (can be used to evaluate the calorimeter track around an arbitrary axis, by setting the status vector with zero deflection ) |
| 529 |
|
// |
| 530 |
|
// |
| 531 |
|
CaloTrkVar* CaloPreSampler::AddCaloTrkVar(float *al,int trktag){ |
| 532 |
|
|
| 533 |
|
int ntrkentry = pcalo->ntrk(); |
| 534 |
|
// |
| 535 |
|
for (Int_t nt=0; nt < ntrkentry; nt++){ |
| 536 |
|
if( pcalo->GetCaloTrkVar(nt)->trkseqno == trktag){ |
| 537 |
|
cout << " CaloTrkVar* CaloPreSampler::AddCaloTrkVar(float *al,int trktag)"<<endl; |
| 538 |
|
cout << " --> trktag = "<<trktag<<" already defined "<<endl; |
| 539 |
|
return NULL; |
| 540 |
|
} |
| 541 |
|
} |
| 542 |
|
// |
| 543 |
|
event->clevel1->good2 = 1; //is a trk track |
| 544 |
|
event->clevel1->trkchi2 = 0; |
| 545 |
|
event->clevel1->hzn = 0; |
| 546 |
|
// |
| 547 |
|
// Copy the alpha vector in the input structure |
| 548 |
|
// |
| 549 |
|
for (Int_t e = 0; e < 5 ; e++){ |
| 550 |
|
event->clevel1->al_p[e][0] = al[e]; |
| 551 |
|
}; |
| 552 |
|
// |
| 553 |
|
// Get tracker related variables for this track |
| 554 |
|
// |
| 555 |
|
if ( debug ) printf("track %i Call GetTrkVar() \n",trktag); |
| 556 |
|
event->GetTrkVar(); |
| 557 |
|
if ( debug ) printf(" event->clevel2->dX0l %f \n",event->clevel2->dX0l); |
| 558 |
|
// |
| 559 |
|
// Save tracker track sequence number |
| 560 |
|
// |
| 561 |
|
event->trkseqno = trktag; |
| 562 |
|
// |
| 563 |
|
// Copy values in the class ca from the structure clevel2 |
| 564 |
|
// |
| 565 |
|
if ( debug ) printf("track %i Call FillTrkVar() \n",trktag); |
| 566 |
|
event->FillTrkVar(pcalo,ntrkentry); |
| 567 |
|
|
| 568 |
|
return pcalo->GetCaloTrkVar(ntrkentry); |
| 569 |
|
|
| 570 |
|
|
| 571 |
|
};//ELENA |