#include <ANtpInfoObjectFillerNC.h>
Inheritance diagram for ANtpInfoObjectFillerNC:

Public Member Functions | |
| ANtpInfoObjectFillerNC () | |
| ANtpInfoObjectFillerNC (Detector::Detector_t detector) | |
| virtual | ~ANtpInfoObjectFillerNC () |
| bool | FillInformation (int event, ANtpRecoNtpManipulator *ntpManipulator, ANtpEventInfoNC *eventInfo, ANtpTrackInfoNC *trackInfo, ANtpShowerInfoNC *showerInfo, ANtpTruthInfoBeam *truthInfo) |
| void | SetDetector (Detector::Detector_t detector) |
| void | SetClusterArray (const TClonesArray *clusters) |
| void | InitializekNN (ANtpRecoNtpManipulator *ntpManipulator) |
| void | InitializeVHSTraining (const int numPlanes=20, const int numStrips=20) |
Private Member Functions | |
| void | FillEventInformation (ANtpRecoNtpManipulator *ntpManipulator, NtpSREvent *ntpEvent, ANtpEventInfoNC *eventInfo) |
| void | FillTrackInformation (ANtpRecoNtpManipulator *ntpManipulator, NtpSRTrack *ntpTrack, NtpSREvent *ntpEvent, ANtpTrackInfoNC *trackInfo, ANtpEventInfoNC *eventInfo) |
| void | FillShowerInformation (NtpSRShower *ntpShower, ANtpShowerInfoNC *showerInfo, ANtpEventInfoNC *eventInfo) |
| void | FillCrossOverInformation (NtpSRTrack *ntpTrack, NtpSRShower *ntpShower, NtpSREvent *ntpEvent, ANtpRecoNtpManipulator *ntpManipulator, ANtpTrackInfoNC *trackInfo, ANtpShowerInfoNC *showerInfo, ANtpEventInfoNC *eventInfo) |
| void | FillMCInformation (NtpMCTruth *ntpMCTruth, TClonesArray *stdHepArray, ANtpTruthInfoBeam *truthInfo) |
| void | FillStripToPixelMaps () |
| void | ResetXTalkArrays () |
| void | FillPlanePixelSignalArrays (NtpSREvent *ntpEvent) |
| Float_t | FindNearestNeighborPixelSignal (Int_t plane, Int_t pixel, Int_t pmt, Float_t planePixelSignal[][64][2]) |
| void | FindXTalkStrips (NtpSREvent *ntpEvent) |
| void | FindEarlyActivityWeight (NtpSREvent *ntpEvent, ANtpEventInfoNC *eventInfo) |
| void | FillEventTimingAndActivityInformation (ANtpRecoNtpManipulator *ntpManipulator, int event, ANtpEventInfoNC *eventInfo) |
| void | FillVHSEvtInfo (ANtpRecoNtpManipulator *ntpManipulator, ANtpEventInfoNC *eventInfo) |
Private Attributes | |
| Int_t | fPlaneToPMTMapWest [486] |
| Int_t | fPlaneToPMTMapEast [486] |
| Int_t | fStripToPixelMapWest [192] |
| Int_t | fStripToPixelMapEast [192] |
| Int_t | fStripToPixelMapNearU1 [64] |
| Int_t | fStripToPixelMapNearV1 [64] |
| Int_t | fStripToPixelMapNearU2 [64] |
| Int_t | fStripToPixelMapNearV2 [64] |
| Int_t | fStripToPixelMapNearU3 [64] |
| Int_t | fStripToPixelMapNearV3 [64] |
| Float_t | fPlanePixelEastSignal [486][64][2] |
| Float_t | fPlanePixelWestSignal [486][64][2] |
| Int_t | fStripIsXTalkWest [486][192] |
| Int_t | fStripIsXTalkEast [486][192] |
| Int_t | fPlaneCoverage [486] |
| Anp::Interface * | fAnpInterface |
| const TClonesArray * | fClusterArray |
| bool | fkNNSet |
| int | fVHSPlanes |
| int | fVHSStrips |
| std::vector< double > | fAvgCCe |
| std::vector< double > | fAvgCCmu |
| std::vector< double > | fAvgCCtau |
| std::vector< double > | fAvgNC |
| std::vector< double > | fPCCe |
| std::vector< double > | fPCCmu |
| std::vector< double > | fPCCtau |
| std::vector< double > | fPNC |
| std::vector< double > | fVarCCe |
| std::vector< double > | fVarCCmu |
| std::vector< double > | fVarCCtau |
| std::vector< double > | fVarNC |
|
|
Definition at line 69 of file ANtpInfoObjectFillerNC.cxx. References MSG. 00069 : 00070 // ANtpInfoObjectFillerBeam(Detector::kUnknown), 00071 ANtpInfoObjectFillerBeam(Detector::kNear), 00072 fClusterArray(0), 00073 fkNNSet(false), 00074 fVHSPlanes(20), 00075 fVHSStrips(20) 00076 { 00077 MSG("ANtpInfoObjectFillerNC", Msg::kDebug) 00078 << "ANtpInfoObjectFillerNC::Default Constructor" << endl; 00079 00080 FillStripToPixelMaps(); 00081 00082 }
|
|
|
Definition at line 85 of file ANtpInfoObjectFillerNC.cxx. References FillStripToPixelMaps(), and MSG. 00085 : 00086 ANtpInfoObjectFillerBeam(detector), 00087 fClusterArray(0), 00088 fkNNSet(false), 00089 fVHSPlanes(20), 00090 fVHSStrips(20) 00091 { 00092 MSG("ANtpInfoObjectFillerNC", Msg::kDebug) 00093 << "ANtpInfoObjectFillerNC::Constructor" << endl; 00094 00095 FillStripToPixelMaps(); 00096 00097 }
|
|
|
Definition at line 100 of file ANtpInfoObjectFillerNC.cxx. 00101 {
00102 if(fAnpInterface) delete fAnpInterface;
00103 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 1115 of file ANtpInfoObjectFillerNC.cxx. References ANtpEventInfoNC::aPh3_ns, ANtpEventInfoNC::aPh6_ns, ANtpEventInfoNC::aPhcommon_ns, ANtpEventInfoNC::aPhlast_ns, NtpSRPlane::beg, ANtpRecoNtpManipulator::GetEventManipulator(), ANtpEventManipulator::GetPrimaryTrackNS(), ANtpDefaultValue::IsDefault(), ANtpTrackInfo::length, NtpSREvent::nshower, NtpSREvent::nstrip, NtpSRTrack::nstrip, NtpSRShower::nstrip, NtpSREvent::ntrack, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRStrip::plane, NtpSREvent::plane, ANtpTrackInfo::planes, ANtpShowerInfo::planes, NtpSRPulseHeight::sigcor, NtpSREvent::stp, NtpSRTrack::stp, NtpSRShower::stp, NtpSRStrip::strip, ANtpEventInfoNC::trackExtension, and ANtpEventInfoNC::trackStripsInShower. Referenced by FillInformation(). 01122 {
01123
01124 Int_t indexShowerStrip = 0;
01125 Int_t indexTrackStrip = 0;
01126
01127 eventInfo->trackStripsInShower = 0;
01128 eventInfo->trackExtension = 0;
01129
01130 if(ntpShower && ntpTrack && trackInfo->length < 50.){
01131 for(Int_t ns = 0; ns < ntpShower->nstrip; ++ns){
01132
01133 //get the index for this strip
01134 indexShowerStrip = ntpShower->stp[ns];
01135
01136 //loop over the track strips
01137 for(Int_t nt = 0; nt < ntpTrack->nstrip; ++nt){
01138
01139 indexTrackStrip = ntpTrack->stp[nt];
01140
01141 //check to see if the shower index matches the track index, if so,
01142 //increment the counter for the number of track strips in the shower
01143 if(indexTrackStrip == indexShowerStrip) ++eventInfo->trackStripsInShower;
01144
01145 }//end loop over track strips
01146
01147 }//end loop over shower strips
01148
01149 if(ANtpDefaultValue::IsDefault(showerInfo->planes) ||
01150 ANtpDefaultValue::IsDefault(trackInfo->planes) )
01151 eventInfo->trackExtension = ANtpDefaultValue::kInt;
01152 else
01153 eventInfo->trackExtension = showerInfo->planes - trackInfo->planes;
01154 }//end if shower and track are both present and track length < 50. m
01155
01156 //fill niki's variables
01157 Int_t ssind,ssplind;
01158 Double_t ssphtot;
01159 Bool_t foundshw,foundtrk;
01160
01161 Int_t planes = ntpEvent->plane.beg;
01162
01163 Double_t ph3,ph6,phlast,phcommon,phnowere,hitcommon,hitnowere;
01164 ph3=0.;ph6=0.;phlast=0.;phcommon=0.;phnowere=0.;hitcommon=0.;hitnowere=0.;
01165
01166 NtpSRTrack *ntpTrackNS = ntpManipulator->GetEventManipulator()->GetPrimaryTrackNS();
01167
01168 // loop over strips to compute ph3 ph6 phlast phcommon
01169 for(Int_t evss=0;evss<ntpEvent->nstrip;evss++){
01170 Int_t stp_index=((ntpEvent->stp)[evss]);
01171
01172 if(stp_index!=-1){
01173
01174 NtpSRStrip *ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(stp_index));
01175 if(!ntpStrip) continue;
01176 ssind = ntpStrip->strip;
01177 ssplind = ntpStrip->plane;
01178 ssphtot = ntpStrip->ph1.sigcor+ntpStrip->ph0.sigcor;
01179
01180 foundshw=false;
01181 foundtrk=false;
01182
01183 Double_t phstrips=0;
01184 Double_t phstript=0;
01185 // shower strips
01186 Int_t sshwind,sshwplind;
01187 Double_t sshwphtot;
01188
01189 if(ntpEvent->nshower > 0) {
01190 for(Int_t jj=0;jj<ntpShower->nstrip;jj++){
01191 Int_t stp_indexs=((ntpShower->stp)[jj]);
01192
01193 if(stp_indexs!=-1){
01194
01195 NtpSRStrip *ntpStrip1 = dynamic_cast<NtpSRStrip *>(fStripArray->At(stp_indexs));
01196 if(!foundshw){
01197 sshwind =ntpStrip1->strip;
01198 sshwplind =ntpStrip1->plane;
01199 sshwphtot =ntpStrip1->ph1.sigcor+ntpStrip1->ph0.sigcor;
01200 if(sshwind==ssind && sshwplind==ssplind) {
01201 foundshw=true;
01202 phstrips=sshwphtot;
01203 }
01204 }
01205 }
01206 }
01207 }
01208 // tracks strips
01209 Int_t strkind,strkplind;
01210 Double_t strkphtot;
01211
01212 if(ntpEvent->ntrack > 0) {
01213
01214 for(Int_t jj=0;jj<ntpTrackNS->nstrip;jj++){
01215 Int_t stp_indext=((ntpTrackNS->stp)[jj]);
01216
01217 if(stp_indext!=-1){
01218
01219 NtpSRStrip *ntpStript = dynamic_cast<NtpSRStrip *>(fStripArray->At(stp_indext));
01220
01221 if(!foundtrk){
01222 strkind =ntpStript->strip;
01223 strkplind=ntpStript->plane;
01224 strkphtot=ntpStript->ph1.sigcor+ntpStript->ph0.sigcor;
01225 if(strkind==ssind && strkplind==ssplind) {
01226 foundtrk=true;
01227 phstript=strkphtot;
01228 }
01229 }
01230
01231 }
01232 }
01233 }
01234
01235 if(foundshw && foundtrk) {
01236 hitcommon= hitcommon+1;
01237 phcommon = phcommon+phstrips+phstript;
01238 }
01239 if(!foundshw && ! foundtrk) {
01240 hitnowere=hitnowere+1;
01241 phnowere=phnowere+ssphtot;
01242 }
01243 if(ssplind>=planes && ssplind<=(planes+3)){
01244 ph3=ph3+ssphtot;
01245 }
01246 else if(ssplind>(planes+3) && ssplind<=(planes+6)){
01247 ph6=ph6+ssphtot;
01248 }
01249 else {
01250 phlast=phlast+ssphtot;
01251 }
01252
01253 } // end of if stp_index != -1
01254
01255 } // end of looping over event strips....
01256
01257 //
01258 eventInfo->aPh3_ns = ph3;
01259 eventInfo->aPh6_ns = ph6;
01260 eventInfo->aPhlast_ns = phlast;
01261 eventInfo->aPhcommon_ns = phcommon;
01262
01263
01264 return;
01265 }
|
|
||||||||||||||||
|
Definition at line 1269 of file ANtpInfoObjectFillerNC.cxx. References ANtpEventInfo::begPlane, NtpSREvent::bleach, ANtpEventInfo::endPlane, ANtpEventInfoNC::eventDuration, ANtpEventInfoNC::eventSummaryPlanes, ANtpInfoObjectFiller::FillEventInformation(), FillVHSEvtInfo(), FindEarlyActivityWeight(), NtpSRBleach::fixedWindowPH, ANtpEventInfoNC::fixedWindowPH, fStripIsXTalkEast, fStripIsXTalkWest, ANtpRecoNtpManipulator::GetSnarlEventSummary(), NtpSRBleach::lateBucketPHFraction, ANtpEventInfoNC::lateBucketPHFraction, ANtpEventInfoNC::lengthInPlanes, ANtpEventInfoNC::maxPHIn12Planes, ANtpEventInfoNC::maxPHIn3Planes, ANtpEventInfoNC::maxPHIn6Planes, ANtpEventInfoNC::maxPHIn9Planes, ANtpEventInfoNC::maxPlanePH, ANtpEventInfoNC::modifiedPH, NtpSRPlane::n, nPlanes, NtpSREvent::nstrip, ANtpEventInfo::passStrips, NtpSRStrip::ph0, NtpSRStrip::ph1, ANtpEventInfoNC::phPerPlane, ANtpEventInfoNC::phPerStrip, NtpSREventSummary::plane, NtpSRStrip::plane, ANtpEventInfo::planes, ANtpEventInfo::pulseHeight, ANtpEventInfoNC::pulseHeightRms, NtpSRPulseHeight::raw, ANtpEventInfoNC::Reset(), NtpSRPulseHeight::sigcor, NtpSREvent::stp, NtpSRBleach::straightPHFraction, ANtpEventInfoNC::straightPHFraction, NtpSRStrip::strip, ANtpEventInfoNC::stripTime1st, ANtpEventInfoNC::stripTimelast, ANtpEventInfoNC::stripTimeMean, ANtpEventInfoNC::stripTimeRMS, NtpSRStrip::time0, NtpSRStrip::time1, NtpSRBleach::timeWeightedPHFraction, ANtpEventInfoNC::timeWeightedPHFraction, ANtpEventInfo::totalStrips, ANtpEventInfoNC::triPlane1PH, ANtpEventInfoNC::triPlane2PH, and ANtpEventInfoNC::triPlaneOverPH. Referenced by FillInformation(). 01272 {
01273
01274 eventInfo->Reset();
01275 ANtpInfoObjectFiller::FillEventInformation(ntpManipulator,
01276 ntpEvent,
01277 eventInfo);
01278
01279 NtpSRStrip *ntpStrip = 0;
01280
01281 eventInfo->lengthInPlanes = eventInfo->endPlane - eventInfo->begPlane + 1;
01282 eventInfo->lateBucketPHFraction = ntpEvent->bleach.lateBucketPHFraction;
01283 eventInfo->timeWeightedPHFraction = ntpEvent->bleach.timeWeightedPHFraction;
01284 eventInfo->straightPHFraction = ntpEvent->bleach.straightPHFraction;
01285 eventInfo->fixedWindowPH = ntpEvent->bleach.fixedWindowPH;
01286
01287 //add up the pulse height in each plane to find the maximum in the event
01288 Float_t planePH[500] = {0.};
01289 eventInfo->totalStrips = ntpEvent->nstrip;
01290 eventInfo->passStrips = 0;
01291 eventInfo->modifiedPH = 0.;
01292 if(eventInfo->totalStrips > 0){
01293 eventInfo->phPerStrip = eventInfo->pulseHeight/(1.*eventInfo->totalStrips);
01294 eventInfo->phPerPlane = eventInfo->pulseHeight/(1.*eventInfo->planes);
01295 }
01296
01297 double maxStripTime = -1.e12;
01298 double minStripTime = 1.e12;
01299
01300 //......................................................................
01301 // -=NEW VARIABLES=-
01302
01303 // PLANE ADC (`GLOBAL') VARIABLES
01304 // First make summary of plane ADC
01305 const UInt_t nPlanes(eventInfo->planes);
01306 vector<Float_t> planeAdc(nPlanes+12,0);
01307 // pad vector with 12 zeros. these are needed later
01308 const vector<Float_t>::const_iterator pAdc_begin(planeAdc.begin());
01309 const vector<Float_t>::const_iterator pAdc_last(pAdc_begin + nPlanes);
01310
01311 // Also calculate some simple event duration type variables
01312 Double_t t_1stStp(10.); //time of first strip in event
01313 Double_t t_lastStp(0.); // & of last
01314 Double_t t_sumStp(0.); // sum of times
01315 Double_t t_sum2Stp(0.); // sum of squares of times
01316 Int_t nStpHit( ntpEvent->nstrip ); // number of double ended strips
01317 //......................................................................
01318
01319 for(Int_t ns = 0; ns < ntpEvent->nstrip; ++ns){
01320
01321 //get the current strip
01322 if (ntpEvent->stp[ns] >= 0)
01323 ntpStrip = dynamic_cast<NtpSRStrip *>
01324 (fStripArray->At(ntpEvent->stp[ns]));
01325 else continue;
01326 if(ntpStrip->plane>0 && ntpStrip->plane<486){
01327 planePH[ntpStrip->plane] += ntpStrip->ph0.sigcor + ntpStrip->ph1.sigcor;
01328
01329 if( fDetector == Detector::kFar
01330 && (!fStripIsXTalkWest[ntpStrip->plane][ntpStrip->strip]
01331 || !fStripIsXTalkEast[ntpStrip->plane][ntpStrip->strip]))
01332 ++eventInfo->passStrips;
01333 else if( fDetector == Detector::kNear
01334 && !fStripIsXTalkWest[ntpStrip->plane][ntpStrip->strip])
01335 ++eventInfo->passStrips;
01336
01337 if(ntpStrip->ph1.raw > 200.) eventInfo->modifiedPH += ntpStrip->ph1.raw;
01338
01339 if(ntpStrip->time1 > maxStripTime) maxStripTime = ntpStrip->time1;
01340 if(ntpStrip->time1 < minStripTime) minStripTime = ntpStrip->time1;
01341
01342 }
01343 //......................................................................
01344 // -=NEW VARIABLES=-
01345
01346 // Plane ADC vars
01347 Int_t pln_index = ntpStrip->plane - eventInfo->begPlane;
01348 if (pln_index < (Int_t) nPlanes && pln_index >= 0) {
01349 planeAdc[pln_index] += ntpStrip->ph0.sigcor;
01350 planeAdc[pln_index] += ntpStrip->ph1.sigcor;
01351 }
01352
01353 // event duration variables
01354 Double_t t_stpHitA = TMath::Max(ntpStrip->time0 , ntpStrip->time1);
01355 Double_t t_stpHitB = TMath::Min(ntpStrip->time0 , ntpStrip->time1);
01356 //Earlier hit may be -ive, meaning a single ended hit
01357 t_1stStp = TMath::Min(t_1stStp, t_stpHitA);
01358 t_lastStp = TMath::Max(t_lastStp, t_stpHitA);
01359 t_sumStp += t_stpHitA;
01360 t_sum2Stp += t_stpHitA * t_stpHitA;
01361
01362 if (t_stpHitB > 0 ){
01363 t_1stStp = TMath::Min(t_1stStp, t_stpHitB);
01364 t_lastStp = TMath::Max(t_lastStp, t_stpHitB);
01365 t_sumStp += t_stpHitB;
01366 t_sum2Stp += t_stpHitB * t_stpHitB;
01367 ++nStpHit;
01368 }
01369 //......................................................................
01370
01371 }//end loop over event strips
01372
01373 //......................................................................
01374 // -=NEW VARIABLES=-
01375 eventInfo->stripTimeMean = t_sumStp / nStpHit;
01376 Float_t t_variance = t_sum2Stp / nStpHit
01377 - (t_sumStp / nStpHit) * (t_sumStp / nStpHit);
01378
01379 eventInfo->stripTimeRMS = TMath::Sqrt(TMath::Abs(t_variance));
01380
01381 eventInfo->stripTime1st = t_1stStp;
01382 eventInfo->stripTimelast = t_lastStp;
01383 //......................................................................
01384
01385 eventInfo->eventDuration = maxStripTime - minStripTime;
01386
01387 if(fDetector == Detector::kNear) FindEarlyActivityWeight(ntpEvent, eventInfo);
01388
01389 //find the rms of the ph per plane for the event and the
01390 //plane with the max ph. also find the maximum signal in windows of
01391 //3,6,9,12 planes from the first plane
01392
01393 TH1F planePHDist("planePHDist", "", 400, 0., 400.);
01394 eventInfo->maxPlanePH = 0.;
01395 eventInfo->maxPHIn3Planes = 0.;
01396 eventInfo->maxPHIn6Planes = 0.;
01397 eventInfo->maxPHIn9Planes = 0.;
01398 eventInfo->maxPHIn12Planes = 0.;
01399
01400 for(Int_t i = eventInfo->begPlane; i <= eventInfo->endPlane; ++i){
01401 if(planePH[i] > eventInfo->maxPlanePH) eventInfo->maxPlanePH = planePH[i];
01402 if(planePH[i] > 0.) planePHDist.Fill(planePH[i]*1.e-4);
01403 }
01404
01405 Float_t phInWindow = 0.;
01406 for(Int_t windowSize = 3; windowSize<14; windowSize +=3){
01407 for(Int_t i = eventInfo->begPlane; i<=eventInfo->endPlane; ++i){
01408 phInWindow = 0.;
01409 for(Int_t j = 0; j<windowSize && j+i<=eventInfo->endPlane; ++j){
01410 phInWindow += planePH[i+j];
01411 }
01412 if(windowSize == 3 && eventInfo->maxPHIn3Planes<phInWindow)
01413 eventInfo->maxPHIn3Planes = phInWindow;
01414 else if(windowSize == 6 && eventInfo->maxPHIn6Planes<phInWindow)
01415 eventInfo->maxPHIn6Planes = phInWindow;
01416 else if(windowSize == 9 && eventInfo->maxPHIn9Planes<phInWindow)
01417 eventInfo->maxPHIn9Planes = phInWindow;
01418 else if(windowSize == 12 && eventInfo->maxPHIn12Planes<phInWindow)
01419 eventInfo->maxPHIn12Planes = phInWindow;
01420 } //end loop over planes in event
01421
01422 }//end loop over window size
01423
01424 eventInfo->pulseHeightRms = planePHDist.GetRMS();
01425
01426 //......................................................................
01427 // -=NEW VARIABLES=-
01428
01429 //Calculate pulse height in plane groups 1 to 3 and 4 to 6
01430 eventInfo->triPlane1PH = accumulate(pAdc_begin, pAdc_begin+3, 0.0 );
01431 eventInfo->triPlane2PH = accumulate(pAdc_begin+3, pAdc_begin+6, 0.0 );
01432 if (nPlanes>6)
01433 eventInfo->triPlaneOverPH = accumulate(pAdc_begin+6, pAdc_last, 0.0 );
01434 else
01435 eventInfo->triPlaneOverPH = 0.0;
01436 //......................................................................
01437
01438 eventInfo->eventSummaryPlanes = ntpManipulator->GetSnarlEventSummary().plane.n;
01439
01440 // Image recognition discriminants (KEA)
01441 FillVHSEvtInfo(ntpManipulator, eventInfo);
01442
01443 return;
01444 }
|
|
||||||||||||||||
|
Definition at line 301 of file ANtpInfoObjectFillerNC.cxx. References ANtpEventInfoNC::closeTimeDeltaZ, ANtpEventInfoNC::closeTimeEvent, ANtpEventInfoNC::edgeActivityPH, ANtpEventInfoNC::edgeActivityStrips, ANtpEventManipulator::GetEvent(), ANtpRecoNtpManipulator::GetEventArray(), ANtpRecoNtpManipulator::GetEventManipulator(), ANtpRecoNtpManipulator::GetNtpStRecord(), ANtpEventManipulator::GetPrimaryShower(), ANtpEventManipulator::GetPrimaryTrack(), ANtpRecoNtpManipulator::GetReleaseMCType(), ANtpSliceManipulator::GetSlice(), ANtpRecoNtpManipulator::GetSliceManipulator(), ANtpEventInfo::index, NtpSREvent::index, ANtpEventInfoNC::largestEventInSnarl, ANtpEventInfoNC::medianTime, ANtpEventInfoNC::minDeltaZ, ANtpEventInfoNC::minTimeSeparation, NtpSRPlane::n, NtpSREvent::nstrip, NtpSREvent::ntrack, ANtpEventInfoNC::oppEdgePH, ANtpEventInfoNC::oppEdgeStrips, NtpSREvent::ph, NtpSRSlice::ph, NtpSRStrip::ph1, NtpSRStrip::plane, NtpSRShower::plane, NtpSRTrack::plane, NtpSRVertex::plane, ANtpEventManipulator::SetEventInSnarl(), ANtpSliceManipulator::SetSliceInSnarl(), NtpSRPulseHeight::sigcor, NtpSREvent::slc, ANtpEventInfoNC::slicePHfraction, NR::sort(), NtpSREvent::stp, NtpSRStrip::time1, NtpSRStrip::tpos, NtpSRTrack::vtx, NtpSREvent::vtx, and NtpSRVertex::z. Referenced by FillInformation(). 00304 {
00305
00306 //the event number passed into the method is the current event we care about
00307 ntpManipulator->GetEventManipulator()->SetEventInSnarl(event);
00308 NtpSREvent *ntpEvent = ntpManipulator->GetEventManipulator()->GetEvent();
00309
00310 //....................................................................
00311 // calculate minTimeSeparation based on the median time of strips in
00312 // the first 5 planes from the vertex
00313
00314 NtpSREvent *otherEvent = 0;
00315 NtpSRStrip *ntpStrip = 0;
00316 Double_t thisEvtTime = 99999.;
00317
00318 //Correct cedar vertex bug
00319 Int_t thisVtxPlane = 0;
00320 Float_t thisVtxZ = 0.0;
00321
00322 TString reco = ntpManipulator->GetReleaseMCType();
00323 if(reco.Contains((ReleaseType::AsString(ReleaseType::kCedarData)).c_str()) ||
00324 reco.Contains((ReleaseType::AsString(ReleaseType::kCedarCarrot)).c_str()) ||
00325 reco.Contains((ReleaseType::AsString(ReleaseType::kCedarDaikon)).c_str())){
00326
00327 NtpVtxFinder::NtpVtxFinder vtxf;
00328 vtxf.SetTargetEvent(static_cast <int> (ntpEvent->index),
00329 ntpManipulator->GetNtpStRecord());
00330 if (vtxf.FindVertex()<0){ //Take existing vertex if fix cannot be used
00331 thisVtxPlane = ntpEvent->vtx.plane;
00332 thisVtxZ = ntpEvent->vtx.z;
00333 } else {
00334 thisVtxPlane = vtxf.VtxPlane();
00335 thisVtxZ = vtxf.VtxZ();
00336 }//if(vtxf.FindVertex())
00337
00338 }else {
00339 thisVtxPlane = ntpEvent->vtx.plane;
00340 thisVtxZ = ntpEvent->vtx.z;
00341 }//if(reco.Contains(...))
00342
00343 NtpSRTrack *ntpTrack = 0;
00344 NtpSRShower *ntpShower = 0;
00345
00346 //get the primary shower for the event - if no shower is present it
00347 //returns 0
00348 ntpShower = ntpManipulator->GetEventManipulator()->GetPrimaryShower();
00349 //get the primary track for the event - if no track is present it
00350 //returns 0
00351 ntpTrack = ntpManipulator->GetEventManipulator()->GetPrimaryTrack();
00352 if(ntpTrack && ntpShower){
00353 if ( (ntpEvent->ntrack > 0)
00354 && ( (ntpTrack->plane.n - ntpShower->plane.n)>0)) {
00355 thisVtxPlane = ntpTrack->vtx.plane;
00356 thisVtxZ = ntpTrack->vtx.z - 3.92 * Munits::cm;
00357 }
00358 }
00359
00360 vector<Double_t> stpTimes; // container needed to calculate median
00361
00362 // loop over strips in current event
00363 for(Int_t ns = 0; ns < ntpEvent->nstrip; ++ns){
00364 //get the current strip
00365 if (ntpEvent->stp[ns] >= 0)
00366 ntpStrip = dynamic_cast<NtpSRStrip *>
00367 (fStripArray->At(ntpEvent->stp[ns]));
00368 else continue;
00369 if (ntpStrip->plane >= thisVtxPlane && ntpStrip->plane < (thisVtxPlane+5)) {
00370 stpTimes.push_back(ntpStrip->time1);
00371 }
00372 }
00373 // calculate strip time median for this event
00374 sort(stpTimes.begin(), stpTimes.end());
00375 if (stpTimes.size()%2)
00376 thisEvtTime = *(stpTimes.begin()+stpTimes.size()/2);
00377 else
00378 thisEvtTime = ( *(stpTimes.begin()+stpTimes.size()/2)
00379 + *(stpTimes.begin()+stpTimes.size()/2-1) )/2.;
00380
00381 Double_t timeDiff = 99999.;
00382 Int_t closeEventIndex = ANtpDefVal::kInt;
00383 Float_t minDeltaZ = ANtpDefVal::kFloat;
00384 for(int i = 0; i < ntpManipulator->GetEventArray()->GetLast()+1; ++i){
00385 ntpManipulator->GetEventManipulator()->SetEventInSnarl(i);
00386 otherEvent = ntpManipulator->GetEventManipulator()->GetEvent();
00387
00388 // don't want to compare time to itself
00389 if (i == event) continue;
00390
00391 Int_t vtxPlane = 0;
00392 Float_t vtxZ = 0.0;
00393
00394 if(reco.Contains((ReleaseType::AsString(ReleaseType::kCedarData)).c_str()) ||
00395 reco.Contains((ReleaseType::AsString(ReleaseType::kCedarCarrot)).c_str())||
00396 reco.Contains((ReleaseType::AsString(ReleaseType::kCedarDaikon)).c_str())){
00397
00398 NtpVtxFinder::NtpVtxFinder vtxf;
00399 vtxf.SetTargetEvent(static_cast <int> (otherEvent->index),
00400 ntpManipulator->GetNtpStRecord());
00401 if (vtxf.FindVertex()<0){ //Take existing vertex if fix cannot be used
00402 vtxPlane = otherEvent->vtx.plane;
00403 vtxZ = otherEvent->vtx.z;
00404 } else{
00405 vtxPlane = vtxf.VtxPlane();
00406 vtxZ = vtxf.VtxZ();
00407 }
00408 } else {
00409 vtxPlane = otherEvent->vtx.plane;
00410 vtxZ = otherEvent->vtx.z;
00411 }
00412
00413
00414 NtpSRTrack *otherTrack = 0;
00415 NtpSRShower *otherShower = 0;
00416
00417 //get the primary shower for the event - if no shower is present it
00418 //returns 0
00419 otherShower = ntpManipulator->GetEventManipulator()->GetPrimaryShower();
00420 //get the primary track for the event - if no track is present it
00421 //returns 0
00422 otherTrack = ntpManipulator->GetEventManipulator()->GetPrimaryTrack();
00423
00424 if(otherTrack && otherShower){
00425 if ( (otherEvent->ntrack > 0)
00426 && ( (otherTrack->plane.n - otherShower->plane.n)>0)) {
00427 vtxPlane = otherTrack->vtx.plane;
00428 vtxZ = otherTrack->vtx.z - 3.92 * Munits::cm;
00429 }
00430 }
00431 //_______________________________________________
00432
00433
00434
00435 Double_t evtTime = 99999.;
00436 stpTimes.clear();
00437
00438 // loop over strips in other event
00439 for(Int_t ns = 0; ns < otherEvent->nstrip; ++ns){
00440 //get the current strip
00441 if (otherEvent->stp[ns] >= 0)
00442 ntpStrip = dynamic_cast<NtpSRStrip *>
00443 (fStripArray->At(otherEvent->stp[ns]));
00444 else continue;
00445 if (ntpStrip->plane >= vtxPlane && ntpStrip->plane < (vtxPlane+5)) {
00446 stpTimes.push_back(ntpStrip->time1);
00447 }
00448 }
00449 // calculate strip time median for this event
00450 sort(stpTimes.begin(), stpTimes.end());
00451 if (stpTimes.size()%2)
00452 evtTime = *(stpTimes.begin()+stpTimes.size()/2);
00453 else
00454 evtTime= ( *(stpTimes.begin()+stpTimes.size()/2)
00455 + *(stpTimes.begin()+stpTimes.size()/2-1) )/2.;
00456
00457 Double_t deltaT = evtTime - thisEvtTime;
00458 if( TMath::Abs(deltaT) < TMath::Abs(timeDiff)) {
00459 timeDiff = deltaT;
00460 closeEventIndex = i;
00461 eventInfo->closeTimeDeltaZ = thisVtxZ - vtxZ;
00462 }
00463
00464 // find minimum DeltaZ
00465 Float_t deltaZ = thisVtxZ - vtxZ;
00466 if( TMath::Abs(deltaZ) < TMath::Abs(minDeltaZ)) {
00467 minDeltaZ = deltaZ;
00468 }
00469 }//end loop over events to find min time separation between events
00470 eventInfo->minTimeSeparation = timeDiff;
00471 eventInfo->closeTimeEvent = closeEventIndex;
00472 eventInfo->minDeltaZ = minDeltaZ;
00473 eventInfo->medianTime = thisEvtTime;
00474
00475 //....................................................................
00476 // calculate slice PH fraction
00477 ntpManipulator->GetSliceManipulator()->SetSliceInSnarl(ntpEvent->slc);
00478 NtpSRSlice* ntpSlice = ntpManipulator->GetSliceManipulator()->GetSlice();
00479 Float_t slicePH = ntpSlice->ph.sigcor;
00480 Float_t eventPH = ntpEvent->ph.sigcor;
00481 eventInfo->slicePHfraction = eventPH/slicePH;
00482 //....................................................................
00483 // calculate edge activity variables
00484 Double_t activityTimeStart = thisEvtTime - 4e-8; // +/- 40ns window
00485 Double_t activityTimeStop = thisEvtTime + 4e-8;
00486 Int_t edgeActivityStrips = 0;
00487 Float_t edgeActivityPH = 0;
00488 Int_t oppEdgeStrips = 0;
00489 Float_t oppEdgePH = 0;
00490 // loop over strips in snarl
00491 for(int i = 0; i < fStripArray->GetLast()+1; ++i){
00492 NtpSRStrip* strip = dynamic_cast<NtpSRStrip *>(fStripArray->At(i));
00493 // consider only strips in time window
00494 if (strip->time1>activityTimeStart
00495 && strip->time1<activityTimeStop) {
00496
00497 // look at U planes in calorimeter
00498 if (strip->plane%2==1 && (strip->tpos<-0.24)
00499 && strip->plane<121) {
00500 edgeActivityStrips++;
00501 edgeActivityPH += strip->ph1.sigcor;
00502 }
00503 // look at opposite edge in U (use 3 strips of fully instr.)
00504 if (strip->plane%2==1 && (strip->tpos>2.27)
00505 && strip->plane<121) {
00506 oppEdgeStrips++;
00507 oppEdgePH += strip->ph1.sigcor;
00508 }
00509 // look at V planes in calorimeter
00510 if (strip->plane%2==0 && (strip->tpos>0.24)
00511 && strip->plane<121) {
00512 edgeActivityStrips++;
00513 edgeActivityPH += strip->ph1.sigcor;
00514 }
00515 // look at opposite edge in V (use 3 strips of fully instr.)
00516 if (strip->plane%2==0 && (strip->tpos<-2.27)
00517 && strip->plane<121) {
00518 oppEdgeStrips++;
00519 oppEdgePH += strip->ph1.sigcor;
00520 }
00521
00522 } // time window
00523 }
00524 eventInfo->edgeActivityPH = edgeActivityPH;
00525 eventInfo->edgeActivityStrips = edgeActivityStrips;
00526 eventInfo->oppEdgePH = oppEdgePH;
00527 eventInfo->oppEdgeStrips = oppEdgeStrips;
00528
00529 //....................................................................
00530
00531 //loop over event array and set the largest event flag
00532 int largestIndex = 0;
00533 double largestPH = 0.;
00534 for(int i = 0; i < ntpManipulator->GetEventArray()->GetLast()+1; ++i){
00535 ntpManipulator->GetEventManipulator()->SetEventInSnarl(i);
00536 otherEvent = ntpManipulator->GetEventManipulator()->GetEvent();
00537 if(otherEvent->ph.sigcor > largestPH){
00538 largestPH = otherEvent->ph.sigcor;
00539 largestIndex = i;
00540 }
00541 }
00542
00543 if(eventInfo->index == largestIndex)
00544 eventInfo->largestEventInSnarl = 1;
00545
00546 //make sure to set the event manipulator back to the correct event in the snarl
00547 ntpManipulator->GetEventManipulator()->SetEventInSnarl(event);
00548
00549 return;
00550 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 244 of file ANtpInfoObjectFillerNC.cxx. References NtpTHEvent::completeall, ANtpTruthInfoBeam::eventCompleteness, FillCrossOverInformation(), FillEventInformation(), FillEventTimingAndActivityInformation(), FillMCInformation(), FillShowerInformation(), FillTrackInformation(), ANtpEventManipulator::GetEvent(), ANtpRecoNtpManipulator::GetEventManipulator(), ANtpRecoNtpManipulator::GetMCManipulator(), ANtpMCManipulator::GetNtpMCTruth(), ANtpMCManipulator::GetNtpTHEvent(), ANtpEventManipulator::GetPrimaryShower(), ANtpEventManipulator::GetPrimaryTrack(), ANtpRecoNtpManipulator::GetStdHepArray(), MAXMSG, NtpTHEvent::neumc, and ANtpEventManipulator::SetEventInSnarl(). Referenced by CondensedNtpModuleNC::Ana(). 00250 {
00251
00252 NtpSRTrack *ntpTrack = 0;
00253 NtpSREvent *ntpEvent = 0;
00254 NtpSRShower *ntpShower = 0;
00255 NtpMCTruth *ntpMCTruth = 0;
00256 NtpTHEvent *ntpTHEvent = 0;
00257
00258 MAXMSG("ANtpInfoObjectFillerNC", Msg::kDebug,20)
00259 << "Begin Fill Information method..." << endl;
00260
00261 //get event. the call to ANtpEventManipulator::SetEventInSnarl sets the
00262 //NtpSREvent data member in that object to the current event so that
00263 //you can later call for the primary track, shower, etc.
00264 ntpManipulator->GetEventManipulator()->SetEventInSnarl(event);
00265 ntpEvent = ntpManipulator->GetEventManipulator()->GetEvent();
00266 if(!ntpEvent) return false;
00267
00268 FillEventInformation(ntpManipulator, ntpEvent, eventInfo);
00269 FillEventTimingAndActivityInformation(ntpManipulator, event, eventInfo);
00270
00271 //get the primary shower for the event - if no shower is present it
00272 //returns 0
00273 ntpShower = ntpManipulator->GetEventManipulator()->GetPrimaryShower();
00274 if(ntpShower) FillShowerInformation(ntpShower, showerInfo, eventInfo);
00275
00276 //get the primary track for the event - if no track is present it
00277 //returns 0
00278 ntpTrack = ntpManipulator->GetEventManipulator()->GetPrimaryTrack();
00279 if(ntpTrack)
00280 FillTrackInformation(ntpManipulator, ntpTrack, ntpEvent, trackInfo, eventInfo);
00281
00282 FillCrossOverInformation(ntpTrack, ntpShower, ntpEvent, ntpManipulator,
00283 trackInfo, showerInfo, eventInfo);
00284
00285 // Get the truth information for this track if it is MC
00286 // Get best neu match from Truthhelper
00287 ntpTHEvent = ntpManipulator->GetMCManipulator()->GetNtpTHEvent(event);
00288
00289 if(ntpTHEvent)
00290 ntpMCTruth = ntpManipulator->GetMCManipulator()->GetNtpMCTruth(ntpTHEvent->neumc);
00291 if(ntpMCTruth)
00292 FillMCInformation(ntpMCTruth, ntpManipulator->GetStdHepArray(), truthInfo);
00293 // added by Tobi
00294 if (truthInfo && ntpTHEvent)
00295 truthInfo->eventCompleteness = ntpTHEvent->completeall;
00296
00297 return true;
00298 }
|
|
||||||||||||||||
|
Definition at line 1448 of file ANtpInfoObjectFillerNC.cxx. References ANtpInfoObjectFillerBeam::FillBeamMCTruthInformation(), ANtpInfoObjectFiller::FillMCTruthInformation(), and ANtpTruthInfoBeam::Reset(). Referenced by FillInformation(). 01451 {
01452 truthInfo->Reset();
01453 ANtpInfoObjectFiller::FillMCTruthInformation(ntpMCTruth, truthInfo);
01454 ANtpInfoObjectFillerBeam::FillBeamMCTruthInformation(ntpMCTruth, stdHepArray, truthInfo);
01455
01456 return;
01457 }
|
|
|
Definition at line 1460 of file ANtpInfoObjectFillerNC.cxx. References fPlaneCoverage, fPlanePixelEastSignal, fPlanePixelWestSignal, fPlaneToPMTMapEast, fPlaneToPMTMapWest, fStripToPixelMapEast, fStripToPixelMapNearU1, fStripToPixelMapNearU2, fStripToPixelMapNearU3, fStripToPixelMapNearV1, fStripToPixelMapNearV2, fStripToPixelMapNearV3, fStripToPixelMapWest, MSG, NtpSREvent::nstrip, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRStrip::plane, NtpSRStrip::planeview, NtpSRStrip::pmtindex0, NtpSRStrip::pmtindex1, NtpSRPulseHeight::sigcor, NtpSREvent::stp, and NtpSRStrip::strip. 01461 {
01462 MSG("ANtpInfoObjectFillerNC", Msg::kDebug) << "in FillPlanePixelSignalArrays" << endl;
01463
01464 NtpSRStrip *ntpStrip = 0;
01465
01466 Int_t pixel = 0;
01467 Int_t plane = 0;
01468
01469 //fill the plane to pmt map first. the idea is that there are at most 2 PMT's per plane
01470 //in either detector. put one NtpSRStrip->pmtindex0(1) into the fPlaneToPMTMapEast(West)
01471 //array. near detector only has pmt's on the west side. call that pmt 0 for the plane.
01472 //then when filling the signal arrays if the pmtindex0(1) for a strip is not the one in the
01473 //array, it is pmt 1 for the plane.
01474 for(Int_t ns = 0; ns < ntpEvent->nstrip; ++ns){
01475
01476 //get the NtpSRStrip object
01477 if (ntpEvent->stp[ns] >= 0)
01478 ntpStrip = dynamic_cast<NtpSRStrip *>
01479 (fStripArray->At(ntpEvent->stp[ns]));
01480 else continue;
01481 plane = ntpStrip->plane;
01482
01483 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01484 << "plane " << plane << " strip " << ntpStrip->strip
01485 << " pmt1 " << ntpStrip->pmtindex1 << endl;
01486 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01487 << " pmt0 " << ntpStrip->pmtindex0 << endl;
01488
01489 fPlaneToPMTMapWest[plane] = ntpStrip->pmtindex1;
01490 if(fDetector == Detector::kFar) fPlaneToPMTMapEast[plane] = ntpStrip->pmtindex0;
01491
01492 }//end loop over strips to fill plane to pmt maps
01493
01494 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01495 << "finish filling plane to pmt maps" << endl;
01496
01497 //loop over all the strips and put the signal size in the arrays
01498 for(Int_t ns = 0; ns < ntpEvent->nstrip; ++ns){
01499
01500 //get the NtpSRStrip object
01501 if(ntpEvent->stp[ns] >= 0)
01502 ntpStrip = dynamic_cast<NtpSRStrip *>
01503 (fStripArray->At(ntpEvent->stp[ns]));
01504 else continue;
01505 plane = ntpStrip->plane;
01506
01507 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01508 << "plane " << plane << " strip " << ntpStrip->strip
01509 << " detector " << fDetector << endl;
01510
01511 //got the strip, now fill the plane pixel info
01512 if(fDetector == Detector::kFar){
01513
01514 //east first
01515 pixel = fStripToPixelMapEast[ntpStrip->strip];
01516
01517 if(ntpStrip->pmtindex0 == fPlaneToPMTMapEast[plane])
01518 fPlanePixelEastSignal[plane][pixel][0] = ntpStrip->ph0.sigcor;
01519 else
01520 fPlanePixelEastSignal[plane][pixel][1] = ntpStrip->ph0.sigcor;
01521
01522 //now west
01523 pixel = fStripToPixelMapWest[ntpStrip->strip];
01524 if(ntpStrip->pmtindex1 == fPlaneToPMTMapWest[plane])
01525 fPlanePixelWestSignal[plane][pixel][0] = ntpStrip->ph1.sigcor;
01526 else
01527 fPlanePixelWestSignal[plane][pixel][1] = ntpStrip->ph1.sigcor;
01528
01529 }//end if far detector;
01530 else if(fDetector == Detector::kNear){
01531
01532 //figure out what type of plane you are
01533 //planeview = 2 --> U, 3 --> V
01534 //map types 2 and 3 are for full planes, 1 is for partial
01535 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01536 << "in near detector algorithm "
01537 << " plane " << plane
01538 << " coverage = " << fPlaneCoverage[plane]
01539 << " view = " << (int)ntpStrip->planeview << endl;
01540
01541 if(fPlaneCoverage[plane] == kNearFull){
01542
01543 if((int)ntpStrip->planeview == kU){
01544 pixel = fStripToPixelMapNearU2[ntpStrip->strip];
01545 if(pixel < 0) pixel = fStripToPixelMapNearU3[ntpStrip->strip];
01546 if(pixel < 0)
01547 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01548 << "cannot find pixel for strip " << ntpStrip->strip
01549 << " plane " << plane << endl;
01550
01551 }
01552 else if((int)ntpStrip->planeview == kV){
01553 pixel = fStripToPixelMapNearV2[ntpStrip->strip];
01554 if(pixel < 0) pixel = fStripToPixelMapNearV3[ntpStrip->strip];
01555 if(pixel < 0)
01556 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01557 << "cannot find pixel for strip " << ntpStrip->strip
01558 << " plane " << plane << endl;
01559
01560 }
01561
01562 }//end if full
01563 else if(fPlaneCoverage[plane] == kNearPartial){
01564
01565 if((int)ntpStrip->planeview == kU)
01566 pixel = fStripToPixelMapNearU1[ntpStrip->strip];
01567 else if((int)ntpStrip->planeview == kV)
01568 pixel = fStripToPixelMapNearV1[ntpStrip->strip];
01569
01570 }//end if partial
01571
01572 if(ntpStrip->pmtindex1 == fPlaneToPMTMapWest[plane])
01573 fPlanePixelWestSignal[plane][pixel][0] = ntpStrip->ph1.sigcor;
01574 else
01575 fPlanePixelWestSignal[plane][pixel][1] = ntpStrip->ph1.sigcor;
01576
01577
01578 }//end if near detector
01579 }//end loop over strips
01580
01581 return;
01582 }
|
|
||||||||||||||||
|
Definition at line 933 of file ANtpInfoObjectFillerNC.cxx. References ANtpShowerInfoNC::aShwdig_ns, ANtpShowerInfoNC::aShwplu_ns, ANtpShowerInfoNC::aShwplv_ns, NtpSRShower::clu, ANtpShowerInfoNC::emFrac, ANtpShowerInfoNC::energyGeV, fClusterArray, ANtpInfoObjectFiller::FillShowerInformation(), fStripIsXTalkEast, fStripIsXTalkWest, NtpSRStripPulseHeight::gev, NtpSRCluster::id, MSG, NtpSRShower::ncluster, NtpSRStrip::ndigit, NtpSRShower::ndigit, NtpSRCluster::nstrip, NtpSRShower::nstrip, NtpSRPlane::nu, NtpSRPlane::nv, NtpSRShower::ph, NtpSRStrip::ph0, NtpSRStrip::ph1, ANtpShowerInfoNC::phKurtosis, ANtpShowerInfoNC::phPerPlane, ANtpShowerInfoNC::phPerStrip, NtpSRStrip::plane, NtpSRShower::plane, ANtpEventInfo::planes, ANtpShowerInfo::planes, ANtpShowerInfoNC::planeUseFraction, NtpSRStrip::planeview, ANtpEventInfo::pulseHeight, ANtpShowerInfo::pulseHeight, ANtpShowerInfoNC::Reset(), NtpSRPulseHeight::sigcor, ANtpShowerInfoNC::signalUseFraction, NtpSRShower::stp, NtpSRStrip::strip, ANtpShowerInfo::totalStrips, NtpSRStrip::tpos, ANtpShowerInfoNC::transverseRMSU, ANtpShowerInfoNC::transverseRMSV, ANtpShowerInfoNC::twoEndStripFraction, and ANtpShowerInfoNC::xTalkStrips. Referenced by FillInformation(). 00936 {
00937
00938 showerInfo->Reset();
00939 ANtpInfoObjectFiller::FillShowerInformation(ntpShower, showerInfo);
00940
00941 if(showerInfo->totalStrips > 0){
00942 showerInfo->phPerStrip = showerInfo->pulseHeight/(1.*showerInfo->totalStrips);
00943 showerInfo->phPerPlane = showerInfo->pulseHeight/(1.*showerInfo->planes);
00944 }
00945
00946 NtpSRStrip *ntpStrip = 0;
00947
00948 showerInfo->energyGeV = ntpShower->ph.gev;
00949
00950 Int_t index = 0;
00951 Int_t numDigits = 0;
00952 Int_t numDoubleEndedStrips = 0;
00953
00954 showerInfo->planeUseFraction = -1.;
00955 showerInfo->signalUseFraction = -1.;
00956 if(eventInfo->pulseHeight>0.)
00957 showerInfo->signalUseFraction = showerInfo->pulseHeight/(eventInfo->pulseHeight);
00958 if(eventInfo->planes>0)
00959 showerInfo->planeUseFraction = 1.*showerInfo->planes/(1.*eventInfo->planes);
00960
00961 Int_t plane = 0;
00962 Int_t strip = 0;
00963
00964 showerInfo->xTalkStrips = 0;
00965 showerInfo->twoEndStripFraction = -1.;
00966
00967 Float_t sumTposU = 0.;
00968 Float_t sum2TposU = 0.;
00969 Float_t sumPHU = 0.;
00970 Float_t maxTposU = -10.;
00971 Float_t minTposU = 10.;
00972
00973 Float_t sumTposV = 0.;
00974 Float_t sum2TposV = 0.;
00975 Float_t sumPHV = 0.;
00976 Float_t maxTposV = -10.;
00977 Float_t minTposV = 10.;
00978
00979 Float_t sumPHsigcor(0.);
00980 Int_t nstrip = ntpShower->nstrip;
00981
00982 MSG("ANtpInfoObjectFillerNC", Msg::kDebug) << "shower strips = "
00983 << ntpShower->nstrip << endl;
00984
00985 showerInfo->aShwdig_ns = ntpShower->ndigit;
00986 showerInfo->aShwplu_ns = ntpShower->plane.nu;
00987 showerInfo->aShwplv_ns = ntpShower->plane.nv;
00988 // showerInfo->aShwph_ns = ntpShower->ph.sigcor;
00989 // showerInfo->aShwphper_ns = ntpShower->ph.sigcor/ntpEvent ->ph.sigcor;
00990 // showerInfo->aShwphperpl_ns = ntpShower->ph.sigcor/ntpShower->plane.n;
00991 // showerInfo->aShwphperdig_ns = ntpShower->ph.sigcor/ntpShower->ndigit;
00992 // showerInfo->aShwphperstp_ns = ntpShower->ph.sigcor/ntpShower->nstrip;
00993
00994
00995 for(Int_t ns = 0; ns < ntpShower->nstrip; ++ns){
00996
00997 //get the index for this strip
00998 index = ntpShower->stp[ns];
00999
01000 //get the NtpSRStrip object
01001 ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(index));
01002 plane = (int)ntpStrip->plane;
01003 strip = ntpStrip->strip;
01004
01005 //......................................................................
01006 // -=NEW VARIABLES=-
01007 // use all strips for now
01008 sumPHsigcor += (ntpStrip->ph0.sigcor + ntpStrip->ph1.sigcor);
01009 //......................................................................
01010
01011 numDigits = (int)ntpStrip->ndigit;
01012 if(numDigits == 2) ++numDoubleEndedStrips;
01013
01014 if(fDetector == Detector::kNear){
01015 if(fStripIsXTalkWest[plane][strip]) ++showerInfo->xTalkStrips;
01016 }
01017 else if(fDetector == Detector::kFar){
01018 if(fStripIsXTalkEast[plane][strip] && fStripIsXTalkWest[plane][strip])
01019 ++showerInfo->xTalkStrips;
01020 }//end if far detector
01021
01022 if(ntpStrip->ndigit == 1) continue;
01023 Float_t stpPH(ntpStrip->ph0.sigcor + ntpStrip->ph1.sigcor);
01024 if (ntpStrip->planeview == PlaneView::kU){
01025 maxTposU = TMath::Max(maxTposU, ntpStrip->tpos);
01026 minTposU = TMath::Min(minTposU, ntpStrip->tpos);
01027 sumTposU += (ntpStrip->tpos)*stpPH;
01028 sum2TposU += (ntpStrip->tpos * ntpStrip->tpos) * stpPH;
01029 sumPHU += stpPH;
01030 }
01031 else if (ntpStrip->planeview == PlaneView::kV){
01032 maxTposV = TMath::Max(maxTposV, ntpStrip->tpos);
01033 minTposV = TMath::Min(minTposV, ntpStrip->tpos);
01034 sumTposV += ntpStrip->tpos * stpPH;
01035 sum2TposV += (ntpStrip->tpos * ntpStrip->tpos) * stpPH;
01036 sumPHV +=stpPH;
01037 }
01038
01039 }//end loop over strips
01040
01041 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01042 << "total strips = " << showerInfo->totalStrips << endl;
01043
01044 if(showerInfo->totalStrips>0)
01045 showerInfo->twoEndStripFraction = (1.*numDoubleEndedStrips)/(1.*showerInfo->totalStrips);
01046
01047 if(sumPHU>0){
01048 Float_t centroidU = sumTposU;
01049 if(sumPHU > 0.) centroidU /= sumPHU;
01050 else centroidU = 0.;
01051 showerInfo->transverseRMSU = TMath::Sqrt(TMath::Abs(sum2TposU/sumPHU - centroidU*centroidU));
01052 }
01053 else showerInfo->transverseRMSU = 0.;
01054
01055 if(sumPHV>0){
01056 Float_t centroidV = sumTposV;
01057 if(sumPHV > 0.) centroidV /= sumPHV;
01058 else centroidV = 0.;
01059 showerInfo->transverseRMSV = TMath::Sqrt(TMath::Abs(sum2TposV/sumPHV - centroidV*centroidV));
01060 }
01061 else showerInfo->transverseRMSV = 0.;
01062
01063 //......................................................................
01064 // -=NEW VARIABLES=-
01065 // fills the variables emFrac and phKurtosis
01066
01067 Float_t meanPHsigcor = sumPHsigcor/nstrip;
01068 Float_t secondMoment(0.);
01069 Float_t fourthMoment(0.);
01070
01071 for (Int_t stp_index_shw = 0; stp_index_shw < nstrip ; ++stp_index_shw){
01072 Int_t stp_index = ntpShower->stp[stp_index_shw];
01073 NtpSRStrip* strip =
01074 dynamic_cast<NtpSRStrip *>(fStripArray->At(stp_index));
01075 Float_t stpPH(strip->ph0.sigcor + strip->ph1.sigcor);
01076 secondMoment += TMath::Power((stpPH - meanPHsigcor),2);
01077 fourthMoment += TMath::Power((stpPH - meanPHsigcor),4);
01078 }
01079 Float_t sigma = secondMoment/(nstrip-1);
01080
01081 // Kurtosis of ph distribution as defined in Numerical Recipes
01082 showerInfo->phKurtosis = fourthMoment/(nstrip*sigma*sigma)-3.0;
01083
01084 Int_t emLikeStrips(0);
01085 Bool_t cluFailure(false); // check for very rare cluster failure
01086 for (Int_t clu_index_shw = 0; clu_index_shw < ntpShower->ncluster ;
01087 ++clu_index_shw){
01088 Int_t clu_index = ntpShower->clu[clu_index_shw];
01089
01090 if (clu_index<0) {
01091 MSG("ANtpInfoObjectFillerNC",Msg::kError)
01092 << "Array index for cluster less than 0. This should never happen!"
01093 << endl;
01094 cluFailure = true;
01095 continue;
01096 }
01097
01098 NtpSRCluster* cluster =
01099 dynamic_cast<NtpSRCluster *>(fClusterArray->At(clu_index));
01100 if (cluster->id == 0)
01101 emLikeStrips += cluster->nstrip;
01102 }
01103 if (!cluFailure)
01104 showerInfo->emFrac = (1.0* emLikeStrips)/ntpShower->nstrip;
01105 else
01106 showerInfo->emFrac = -1;
01107
01108 //......................................................................
01109
01110 return;
01111 }
|
|
|
Definition at line 106 of file ANtpInfoObjectFillerNC.cxx. References fPlaneCoverage, fStripToPixelMapEast, fStripToPixelMapNearU1, fStripToPixelMapNearU2, fStripToPixelMapNearU3, fStripToPixelMapNearV1, fStripToPixelMapNearV2, fStripToPixelMapNearV3, fStripToPixelMapWest, and MSG. Referenced by ANtpInfoObjectFillerNC(), and SetDetector(). 00107 {
00108 // Fills the strip to pixel map. Call this when you pick a detector
00109
00110 if(fDetector == Detector::kFar){
00111
00112 //Define the FD strip to pixel maps
00113 Int_t stripToPixelWest[] = {0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00114 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00115 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00116 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00117 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00118 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00119 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00120 0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6};
00121
00122 Int_t stripToPixelEast[] = {0, 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6,
00123 2, 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0,
00124 5, 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0, 2,
00125 7, 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0, 2, 5,
00126 8, 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0, 2, 5, 7,
00127 10, 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0, 2, 5, 7, 8,
00128 13, 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0, 2, 5, 7, 8, 10,
00129 15, 0, 2, 5, 7, 1, 3, 4, 6, 9, 11, 12, 14, 1, 3, 4, 6, 0, 2, 5, 7, 8, 10, 13};
00130
00131 // Fill the strip to pixe map data members
00132 for(Int_t i = 0; i < 192; ++i){
00133 fStripToPixelMapWest[i] = stripToPixelWest[i];
00134 fStripToPixelMapEast[i] = stripToPixelEast[i];
00135 }
00136
00137 // set plane coverages
00138 for(Int_t i = 0; i < 486; ++i) fPlaneCoverage[i] = kComplete;
00139 } // end filling strip to pixel map for far detector
00140
00141 else if(fDetector == Detector::kNear){
00142
00143 // Define the pixel to strip maps
00144 Int_t pixelToStripU1[] = {40, 53, 22, 35, 11, 41, 54, 23,
00145 36, 10, 42, 55, 24, 37, 9, 43,
00146 56, 25, 38, 8, 44, 57, 26, 39,
00147 7, 45, 58, 27, 19, 6, 46, 59,
00148 28, 18, 5, 47, 60, 29, 17, 4,
00149 48, 61, 30, 16, 3, 49, 62, 31,
00150 15, 2, 50, 63, 32, 14, 1, 51,
00151 20, 33, 13, 0, 52, 21, 34, 12};
00152
00153 Int_t pixelToStripV1[] = {27, 14, 45, 32, 56, 26, 13, 44,
00154 31, 57, 25, 12, 43, 30, 58, 24,
00155 11, 42, 29, 59, 23, 10, 41, 28,
00156 60, 22, 9, 40, 48, 61, 21, 8,
00157 39, 49, 62, 20, 7, 38, 50, 63,
00158 19, 6, 37, 51, 64, 18, 5, 36,
00159 52, 65, 17, 4, 35, 53, 66, 16,
00160 47, 34, 54, 67, 15, 46, 33, 55};
00161
00162 Int_t pixelToStripU2[] = {68, 81, 94, 59, -1, 69, 82, 95,
00163 60, -1, 70, 83, 48, 61, -1, 71,
00164 84, 49, 62, -1, 72, 85, 50, 63,
00165 -1, 73, 86, 51, 64, -1, 74, 87,
00166 52, 65, -1, 75, 88, 53, 66, -1,
00167 76, 89, 54, 67, -1, 77, 90, 55,
00168 -1, -1, 78, 91, 56, -1, -1, 79,
00169 92, 57, -1, -1, 80, 93, 58, -1};
00170
00171 Int_t pixelToStripV2[] = {27, 14, 1, 36, -1, 26, 13, 0,
00172 35, -1, 25, 12, 47, 34, -1, 24,
00173 11, 46, 33, -1, 23, 10, 45, 32,
00174 -1, 22, 9, 44, 31, -1, 21, 8,
00175 43, 30, -1, 20, 7, 42, 29, -1,
00176 19, 6, 41, 28, -1, 18, 5, 40,
00177 -1, -1, 17, 4, 39, -1, -1, 16,
00178 3, 38, -1, -1, 15, 2, 37, -1};
00179
00180 Int_t pixelToStripU3[] = {47, 34, 21, 8, -1, 46, 33, 20,
00181 7, -1, 45, 32, 19, 6, -1, 44,
00182 31, 18, 5, -1, 43, 30, 17, 4,
00183 -1, 42, 29, 16, 3, -1, 41, 28,
00184 15, 2, -1, 40, 27, 14, 1, -1,
00185 39, 26, 13, 0, -1, 38, 25, 12,
00186 -1, -1, 37, 24, 11, -1, -1, 36,
00187 23, 10, -1, -1, 35, 22, 9, -1};
00188
00189 Int_t pixelToStripV3[] = {48, 61, 74, 87, -1, 49, 62, 75,
00190 88, -1, 50, 63, 76, 89, -1, 51,
00191 64, 77, 90, -1, 52, 65, 78, 91,
00192 -1, 53, 66, 79, 92, -1, 54, 67,
00193 80, 93, -1, 55, 68, 81, 94, -1,
00194 56, 69, 82, 95, -1, 57, 70, 83,
00195 -1, -1, 58, 71, 84, -1, -1, 59,
00196 72, 85, -1, -1, 60, 73, 86, -1};
00197
00198 //now fill the strip to pixel map data members
00199 for(Int_t i = 0; i < 64; ++i){
00200 fStripToPixelMapNearU1[pixelToStripU1[i]] = i;
00201 fStripToPixelMapNearV1[pixelToStripV1[i]] = i;
00202
00203 fStripToPixelMapNearU2[i] = -1;
00204 if(pixelToStripU2[i]>-1) fStripToPixelMapNearU2[pixelToStripU2[i]] = i;
00205
00206 fStripToPixelMapNearV2[i] = -1;
00207 if(pixelToStripV2[i]>-1) fStripToPixelMapNearV2[pixelToStripV2[i]] = i;
00208
00209 fStripToPixelMapNearU3[i] = -1;
00210 if(pixelToStripU3[i]>-1) fStripToPixelMapNearU3[pixelToStripU3[i]] = i;
00211
00212 fStripToPixelMapNearV3[i] = -1;
00213 if(pixelToStripV3[i]>-1) fStripToPixelMapNearV3[pixelToStripV3[i]] = i;
00214
00215 }//end fill strip to pixel maps
00216
00217 //fill the array of plane coverages
00218 for(Int_t i = 0; i < 282; ++i){
00219 if( i%5 == 1 ) fPlaneCoverage[i] = kNearFull;
00220 else fPlaneCoverage[i] = kNearPartial;
00221 }
00222 }//end filling strip to pixel map for near detector
00223
00224 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
00225 << "ANtpInfoObjectFillerNC::Constructor" << endl;
00226
00227 }
|
|
||||||||||||||||||||||||
|
Definition at line 703 of file ANtpInfoObjectFillerNC.cxx. References ANtpTrackInfoNC::aTrklen_ns, ANtpTrackInfoNC::aTrkpass_ns, ANtpTrackInfoNC::aTrkph_ns, ANtpTrackInfoNC::aTrkphper_ns, ANtpTrackInfoNC::aTrkphperpl_ns, ANtpTrackInfoNC::aTrkplu_ns, ANtpTrackInfoNC::aTrkplv_ns, ANtpTrackInfoNC::aTrkstp_ns, ANtpTrackInfoNC::aTrkvtx_ns, ANtpTrackInfoNC::dtdz, fAnpInterface, ANtpInfoObjectFiller::FillTrackInformation(), NtpSRTrack::fit, fStripIsXTalkEast, fStripIsXTalkWest, Anp::Interface::GetData(), ANtpRecoNtpManipulator::GetEventManipulator(), ANtpEventManipulator::GetPrimaryTrackNS(), ANtpTrackInfoNC::kNN, ANtpTrackInfo::length, ANtpTrackInfoNC::meanLowStripDivHighStrip, ANtpTrackInfoNC::meanSigCor, MSG, NtpSRStrip::ndigit, NtpSREvent::nstrip, NtpSRTrack::nstrip, NtpSRTrackPlane::ntrklike, NtpSRPlane::nu, ANtpTrackInfoNC::numScintPlanes, NtpSRPlane::nv, NtpSRFitTrack::pass, NtpSRPulseHeight::pe, NtpSREvent::ph, NtpSRTrack::ph, NtpSRStrip::ph0, NtpSRStrip::ph1, ANtpTrackInfoNC::phPerPlane, ANtpTrackInfoNC::phPerStrip, NtpSRStrip::plane, NtpSRTrack::plane, ANtpEventInfo::planes, ANtpTrackInfo::planes, ANtpTrackInfoNC::planeUseFraction, NtpSRStrip::planeview, ANtpEventInfo::pulseHeight, ANtpTrackInfo::pulseHeight, ANtpTrackInfoNC::Reset(), NtpSRPulseHeight::sigcor, ANtpTrackInfoNC::signalUseFraction, NtpSRTrack::stp, NtpSREvent::stp, NtpSRTrack::stpx, NtpSRTrack::stpy, NtpSRTrack::stpz, NtpSRStrip::strip, NtpSRStrip::time0, NtpSRStrip::time1, ANtpTrackInfo::totalStrips, ANtpTrackInfoNC::trackLikePlanes, ANtpTrackInfoNC::trackSigCorFraction, ANtpTrackInfoNC::twoEndStripFraction, ANtpTrackInfoNC::uvAsymmetry, NtpSRTrack::vtx, ANtpTrackInfoNC::xTalkStrips, NtpSRStrip::z, and NtpSRVertex::z. Referenced by FillInformation(). 00708 {
00709
00710 trackInfo->Reset();
00711 ANtpInfoObjectFiller::FillTrackInformation(ntpTrack, trackInfo);
00712
00713 if(trackInfo->totalStrips > 0){
00714 trackInfo->phPerStrip = trackInfo->pulseHeight/(1.*trackInfo->totalStrips);
00715 trackInfo->phPerPlane = trackInfo->pulseHeight/(1.*trackInfo->planes);
00716 }
00717
00718 NtpSRStrip *ntpStrip = 0;
00719
00720 Int_t plane = 0, strip = 0, stpCtr = 0;
00721 Float_t xPos = 0., yPos = 0., zPos = 0.;
00722 Int_t uXTalkStripCtr = 0;
00723 Int_t vXTalkStripCtr = 0;
00724
00725 Int_t numDigits = 0, numDoubleEndedStrips = 0;
00726 Int_t stripsInPlane[500], trkStripsInPlane[500];
00727
00728 //....................................................................
00729 // Estimate dtdz of track, using linear regression of (y = Gx +H)
00730 // <G> = (<xy> - <x><y>) / (<x^2> - <x>^2)
00731 Double_t sumZT(0.); Double_t sumZ2(0.);
00732 Double_t sumT(0.); Double_t sumZ(0.);
00733 Int_t nHits(0); // # of digits at FD, # of strips at ND. whew!
00734
00735 //....................................................................
00736
00737 ntpTrack = ntpManipulator->GetEventManipulator()->GetPrimaryTrackNS();
00738
00739 trackInfo->aTrkpass_ns =ntpTrack->fit.pass;
00740 trackInfo->aTrkph_ns =ntpTrack->ph.sigcor;
00741 trackInfo->aTrklen_ns =ntpTrack->plane.ntrklike;
00742 if(ntpTrack->plane.ntrklike>0) trackInfo->aTrkphperpl_ns = ntpTrack->ph.sigcor/ntpTrack->plane.ntrklike;
00743 if(ntpEvent->ph.sigcor>0) trackInfo->aTrkphper_ns = ntpTrack->ph.sigcor/ntpEvent->ph.sigcor;
00744 trackInfo->aTrkplu_ns =ntpTrack->plane.nu;
00745 trackInfo->aTrkplv_ns =ntpTrack->plane.nv;
00746 trackInfo->aTrkstp_ns =ntpTrack->nstrip;
00747 trackInfo->aTrkvtx_ns =ntpTrack->vtx.z;
00748
00749 for(Int_t ii = 0; ii < 500; ++ii){
00750 stripsInPlane[ii] = 0;
00751 trkStripsInPlane[ii] = 0;
00752 }
00753
00754 //loop over the strips in the record and keep track of how many
00755 //are in each plane
00756 Float_t totalPH = 0.;
00757
00758 for(Int_t i = 0; i < ntpEvent->nstrip; ++i){
00759
00760 if(ntpEvent->stp[i] >= 0)
00761 ntpStrip = dynamic_cast<NtpSRStrip *>
00762 (fStripArray->At(ntpEvent->stp[i]));
00763 else continue;
00764 plane = (int)ntpStrip->plane;
00765 strip = ntpStrip->strip;
00766 totalPH = 0;
00767
00768 if( fDetector == Detector::kFar
00769 && !fStripIsXTalkEast[plane][strip] ) totalPH += ntpStrip->ph0.sigcor;
00770 if( !fStripIsXTalkWest[plane][strip] ) totalPH += ntpStrip->ph1.sigcor;
00771
00772 if(totalPH >= 90.){
00773 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
00774 << "plane " << plane << " strip " << ntpStrip->strip << " is ok "
00775 << fStripIsXTalkEast[plane][strip] << "/"
00776 << fStripIsXTalkWest[plane][strip] << " "
00777 << ntpStrip->ph0.sigcor << "/" << ntpStrip->ph1.sigcor << endl;
00778 ++stripsInPlane[(int)ntpStrip->plane];
00779 }
00780
00781 }//end loop over event strips to see how many are in each plane
00782
00783
00784 // Now loop over all strips in the track
00785 // Count the number of strips in each plane for the track
00786 // Also sum up variables needed to fit t(z)
00787
00788 for(Int_t i = 0; i < ntpTrack->nstrip; ++i){
00789
00790 //get the NtpSRStrip object
00791 if (ntpTrack->stp[i] >= 0)
00792 ntpStrip = dynamic_cast<NtpSRStrip *>
00793 (fStripArray->At(ntpTrack->stp[i]));
00794 else continue;
00795 plane = (int)ntpStrip->plane;
00796 totalPH = 0;
00797
00798 if( fDetector > 0 && !fStripIsXTalkEast[plane][strip] ) totalPH += ntpStrip->ph0.sigcor;
00799 if( !fStripIsXTalkWest[plane][strip] ) totalPH += ntpStrip->ph1.sigcor;
00800
00801 if(totalPH >= 90.) ++trkStripsInPlane[(int)ntpStrip->plane];
00802
00803 if(fDetector == Detector::kFar
00804 && fStripIsXTalkEast[plane][strip] && fStripIsXTalkWest[plane][strip]){
00805 if((int)ntpStrip->planeview == kU) ++uXTalkStripCtr;
00806 else if((int)ntpStrip->planeview == kV) ++vXTalkStripCtr;
00807 }
00808 else if(fDetector == Detector::kNear && fStripIsXTalkWest[plane][strip]){
00809 if((int)ntpStrip->planeview == kU) ++uXTalkStripCtr;
00810 else if((int)ntpStrip->planeview == kV) ++vXTalkStripCtr;
00811 }
00812 //..................................................................
00813 if (ntpStrip->ph0.pe > 2.) {
00814 sumZ += ntpStrip->z;
00815 sumZ2 += ntpStrip->z * ntpStrip->z;
00816 sumZT += ntpStrip->z * ntpStrip->time0;
00817 sumT += ntpStrip->time0;
00818 ++nHits;
00819 }
00820
00821 if (ntpStrip->ph1.pe > 2.) {
00822 sumZ += ntpStrip->z;
00823 sumZ2 += ntpStrip->z * ntpStrip->z;
00824 sumZT += ntpStrip->z * ntpStrip->time1;
00825 sumT += ntpStrip->time1;
00826 ++nHits;
00827 }
00828 //..................................................................
00829
00830 } //end loop over strips in track
00831
00832 trackInfo->xTalkStrips = uXTalkStripCtr+vXTalkStripCtr;
00833
00834 //....................................................................
00835 // Calculate dtdz
00836 trackInfo->dtdz = 0;
00837 if (nHits > 1){ // VarZ == 0 if nHits == 1; next conditon would fail
00838 Double_t CovZT = sumZT - (sumZ*sumT)/(Float_t)nHits;
00839 Double_t VarZ = sumZ2 - (sumZ*sumZ)/(Float_t)nHits;
00840 if (VarZ > 0) trackInfo->dtdz = Munits::c_light * CovZT/VarZ;
00841 }
00842 //....................................................................
00843
00844
00845 //loop over all the planes and if the number of strips in the plane for
00846 //the track is the same as the number for the record, then it is a tracklike plane
00847 trackInfo->trackLikePlanes = 0;
00848 for(Int_t i = 0; i < 500; ++i){
00849
00850 if(stripsInPlane[i]>0 && trkStripsInPlane[i]>0
00851 && stripsInPlane[i]*0.9 <= trkStripsInPlane[i])
00852 ++trackInfo->trackLikePlanes;
00853
00854 }
00855
00856
00857 Int_t index = 0;
00858 Int_t nVPlanes = 0, nUPlanes = 0;
00859
00860 nVPlanes = ntpTrack->plane.nv;
00861 nUPlanes = ntpTrack->plane.nu;
00862
00863 trackInfo->uvAsymmetry = 0.;
00864 if(nVPlanes+nUPlanes>0)
00865 trackInfo->uvAsymmetry = TMath::Abs((1.*nUPlanes-1.*nVPlanes)/(1.*nVPlanes+1.*nUPlanes));
00866
00867 trackInfo->signalUseFraction = 0.;
00868 if(eventInfo->pulseHeight>0.)
00869 trackInfo->signalUseFraction = trackInfo->pulseHeight/eventInfo->pulseHeight;
00870
00871 trackInfo->planeUseFraction = 0.;
00872 if(eventInfo->planes>0)
00873 trackInfo->planeUseFraction = 1.*trackInfo->trackLikePlanes/(1.*eventInfo->planes);
00874
00875 trackInfo->totalStrips = 0;
00876
00877 //does the pathlength of the track make sense?
00878 if(trackInfo->length<50.){
00879
00880 //loop over all strips in the track
00881 trackInfo->totalStrips = (int)ntpTrack->nstrip;
00882 numDoubleEndedStrips = 0;
00883
00884 stpCtr = 0;
00885 //ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(ntpTrack->stp[0]));
00886 for(Int_t ns = 0; ns < trackInfo->totalStrips; ++ns){
00887
00888 //get the index for this strip
00889 if (ntpTrack->stp[ns] >= 0) index = ntpTrack->stp[ns];
00890 else continue;
00891 //get the NtpSRStrip object
00892 ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(index));
00893 plane = (int)ntpStrip->plane;
00894 strip = (int)ntpStrip->strip;
00895 numDigits = (int)ntpStrip->ndigit;
00896
00897 xPos = ntpTrack->stpx[ns];
00898 yPos = ntpTrack->stpy[ns];
00899 zPos = ntpTrack->stpz[ns];
00900
00901 if(numDigits == 2){
00902
00903 ++numDoubleEndedStrips;
00904
00905 } // end if the strip had double sided readout
00906 } // end loop over strips in the track
00907
00908 trackInfo->twoEndStripFraction = 0.;
00909 if(trackInfo->totalStrips>0)
00910 trackInfo->twoEndStripFraction = (1.*numDoubleEndedStrips)/(1.*trackInfo->totalStrips);
00911
00912 }//end if reasonable track length
00913
00914 //fill rustem's pid parameter here. the value is stored under key 5240
00915 //the other values are the variables that go into finding the pid value
00916 map<short,float> anpmap = fAnpInterface->GetData(ntpEvent);
00917 map<short,float>::const_iterator itr = anpmap.find(5240);
00918 if(itr != anpmap.end()) trackInfo->kNN = itr->second;
00919 itr = anpmap.find(7001);
00920 if(itr != anpmap.end()) trackInfo->numScintPlanes = itr->second;
00921 itr = anpmap.find(7110);
00922 if(itr != anpmap.end()) trackInfo->meanSigCor = itr->second;
00923 itr = anpmap.find(7120);
00924 if(itr != anpmap.end()) trackInfo->meanLowStripDivHighStrip = itr->second;
00925 itr = anpmap.find(7140);
00926 if(itr != anpmap.end()) trackInfo->trackSigCorFraction = itr->second;
00927
00928 return;
00929 }
|
|
||||||||||||
|
Definition at line 612 of file ANtpInfoObjectFillerNC.cxx. References VHSevent::dCCe, VHSevent::dCCmu, VHSevent::dCCtau, VHSevent::dNC, fAvgCCe, fAvgCCmu, fAvgCCtau, fAvgNC, VHS::FillDiscriminants(), fPCCe, fPCCmu, fPCCtau, fPNC, fVarCCe, fVarCCmu, fVarCCtau, fVarNC, fVHSPlanes, fVHSStrips, ANtpEventManipulator::GetEvent(), ANtpRecoNtpManipulator::GetEventManipulator(), ANtpRecoNtpManipulator::GetStripArray(), VHSevent::pCCe, VHSevent::pCCmu, VHSevent::pCCtau, VHSevent::pNC, ANtpEventInfoNC::vhsDCCe, ANtpEventInfoNC::vhsDCCmu, ANtpEventInfoNC::vhsDCCtau, ANtpEventInfoNC::vhsDNC, ANtpEventInfoNC::vhsPCCe, ANtpEventInfoNC::vhsPCCmu, ANtpEventInfoNC::vhsPCCtau, and ANtpEventInfoNC::vhsPNC. Referenced by FillEventInformation(). 00614 {
00615 //
00616 // Call this once per event to fill the 8 VHS event discriminant variables
00617 //
00618 VHSevent* vhsevt = new VHSevent();
00619
00620 NtpSREvent* evt = ntpManipulator->GetEventManipulator()->GetEvent();
00621 TClonesArray* stp = ntpManipulator->GetStripArray();
00622
00623 VHS::FillDiscriminants(evt, stp,
00624 fAvgNC, fAvgCCe, fAvgCCmu, fAvgCCtau,
00625 fVarNC, fVarCCe, fVarCCmu, fVarCCtau,
00626 fPNC, fPCCe, fPCCmu, fPCCtau,
00627 fVHSPlanes, fVHSStrips, true, vhsevt);
00628
00629 eventInfo->vhsPNC = vhsevt->pNC;
00630 eventInfo->vhsPCCe = vhsevt->pCCe;
00631 eventInfo->vhsPCCmu = vhsevt->pCCmu;
00632 eventInfo->vhsPCCtau = vhsevt->pCCtau;
00633
00634 eventInfo->vhsDNC = vhsevt->dNC;
00635 eventInfo->vhsDCCe = vhsevt->dCCe;
00636 eventInfo->vhsDCCmu = vhsevt->dCCmu;
00637 eventInfo->vhsDCCtau = vhsevt->dCCtau;
00638
00639 return;
00640
00641 }
|
|
||||||||||||
|
Definition at line 1585 of file ANtpInfoObjectFillerNC.cxx. References ANtpEventInfoNC::earlyWeightedADC, MSG, NtpSREvent::nstrip, NtpSRStrip::ph1, NtpSRStrip::plane, NtpSRStrip::pmtindex1, ANtpEventInfo::pulseHeight, NtpSRPulseHeight::sigcor, NtpSREvent::stp, and NtpSRStrip::time1. Referenced by FillEventInformation(). 01587 {
01588
01589 //find the time of the earliest strip in the event
01590 double earliestEventTime = 1.e20;
01591 map<int,int> eventPlanes;
01592 NtpSRStrip *strip = 0;
01593
01594 for(int i = 0; i < ntpEvent->nstrip; ++i){
01595 if (ntpEvent->stp[i] >= 0)
01596 strip = dynamic_cast<NtpSRStrip *>
01597 (fStripArray->At(ntpEvent->stp[i]));
01598 else continue;
01599 if(strip->time1 < earliestEventTime) earliestEventTime = strip->time1;
01600 if(eventPlanes.find(strip->pmtindex1) == eventPlanes.end()) eventPlanes[strip->pmtindex1] = 1;
01601
01602 }
01603
01604 // for(int i = 0; i < ntpEvent->nstrip; ++i){
01605 // strip = dynamic_cast<NtpSRStrip *>(fStripArray->At(ntpEvent->stp[i]));
01606
01607 // MSG("ANtpInfoObjectFillerNC", Msg::kInfo)
01608 // << fHeaderInfo->snarl << " " << fHeaderInfo->events
01609 // << " " << eventInfo->event << " "
01610 // <<strip->plane << " " << earliestEventTime
01611 // << " " << 1.e9*(strip->time1-earliestEventTime) << endl;
01612 // }
01613
01614 //now find the weigthed sum of ADC for the early strips - make sure the early
01615 //strips come from the same pmts as the event strips.
01616
01617 double weightSum = 0.;
01618 for(int i = 0; i < fStripArray->GetLast()+1; ++i){
01619
01620 strip = dynamic_cast<NtpSRStrip *>(fStripArray->At(i));
01621
01622 //work in ns
01623 if(1.e9*(earliestEventTime - strip->time1) > 0.
01624 && 1.e9*(earliestEventTime - strip->time1) < 1000.*1.5
01625 && eventPlanes.find(strip->pmtindex1) != eventPlanes.end()){
01626 weightSum += strip->ph1.sigcor*TMath::Exp(-1.e9*(earliestEventTime - strip->time1)/700.);
01627
01628 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01629 << strip->pmtindex1 << " " << strip->plane
01630 << " " << strip->ph1.sigcor
01631 << " " << 1.e9*(earliestEventTime-strip->time1)
01632 << " " << weightSum
01633 << " " << eventInfo->pulseHeight << endl;
01634
01635 }
01636 }
01637
01638 eventInfo->earlyWeightedADC = weightSum;
01639
01640 return;
01641 }
|
|
||||||||||||||||||||
|
Definition at line 1644 of file ANtpInfoObjectFillerNC.cxx. References MSG. Referenced by FindXTalkStrips(). 01646 {
01647 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01648 << "in FindNearestNeighborPixelSignal" << endl;
01649
01650 Float_t sumNeighborSignal = 0.;
01651
01652 if(fDetector == Detector::kFar){
01653 if(pixel == 5 || pixel == 6 || pixel == 9 || pixel == 10)
01654 sumNeighborSignal = (planePixelSignal[plane][pixel-4][pmt] + planePixelSignal[plane][pixel+4][pmt]
01655 + planePixelSignal[plane][pixel-1][pmt] + planePixelSignal[plane][pixel+1][pmt]);
01656 else if(pixel < 3 && pixel > 0)
01657 sumNeighborSignal = (planePixelSignal[plane][pixel-1][pmt] + planePixelSignal[plane][pixel+1][pmt]
01658 + planePixelSignal[plane][pixel+4][pmt]);
01659 else if(pixel < 15 && pixel > 12)
01660 sumNeighborSignal = (planePixelSignal[plane][pixel-1][pmt] + planePixelSignal[plane][pixel+1][pmt]
01661 + planePixelSignal[plane][pixel-4][pmt]);
01662 else if(pixel > 3 && pixel < 15 && (pixel+1)%4 == 0)
01663 sumNeighborSignal = (planePixelSignal[plane][pixel-4][pmt] + planePixelSignal[plane][pixel+4][pmt]
01664 + planePixelSignal[plane][pixel-1][pmt]);
01665
01666 else if(pixel > 3 && pixel < 12 && pixel%4 == 0)
01667 sumNeighborSignal = (planePixelSignal[plane][pixel-4][pmt] + planePixelSignal[plane][pixel+4][pmt]
01668 + planePixelSignal[plane][pixel+1][pmt]);
01669 else if(pixel == 0)
01670 sumNeighborSignal = planePixelSignal[plane][pixel+4][pmt] + planePixelSignal[plane][pixel+1][pmt];
01671
01672 else if(pixel == 3)
01673 sumNeighborSignal = planePixelSignal[plane][pixel+4][pmt] + planePixelSignal[plane][pixel-1][pmt];
01674
01675 else if(pixel == 12)
01676 sumNeighborSignal = planePixelSignal[plane][pixel-4][pmt] + planePixelSignal[plane][pixel+1][pmt];
01677
01678 else if(pixel == 15)
01679 sumNeighborSignal = planePixelSignal[plane][pixel-4][pmt] + planePixelSignal[plane][pixel-1][pmt];
01680
01681 }//end if far detector
01682 else if(fDetector == Detector::kNear){
01683
01684 if( (pixel > 8 && pixel < 15) || (pixel > 16 && pixel < 23)
01685 || (pixel > 24 && pixel < 31) || (pixel > 32 && pixel < 39)
01686 || (pixel > 40 && pixel < 47) || (pixel > 48 && pixel < 55) )
01687 sumNeighborSignal = (planePixelSignal[plane][pixel-8][pmt] + planePixelSignal[plane][pixel+8][pmt]
01688 + planePixelSignal[plane][pixel-1][pmt] + planePixelSignal[plane][pixel+1][pmt]);
01689 else if( pixel > 0 && pixel < 7)
01690 sumNeighborSignal = (planePixelSignal[plane][pixel-1][pmt] + planePixelSignal[plane][pixel+1][pmt]
01691 + planePixelSignal[plane][pixel+8][pmt]);
01692 else if( pixel > 56 && pixel < 63)
01693 sumNeighborSignal = (planePixelSignal[plane][pixel-1][pmt] + planePixelSignal[plane][pixel+1][pmt]
01694 + planePixelSignal[plane][pixel-8][pmt]);
01695 else if( pixel > 8 && pixel < 63 && (pixel+1)%8==0 )
01696 sumNeighborSignal = (planePixelSignal[plane][pixel-8][pmt] + planePixelSignal[plane][pixel+8][pmt]
01697 + planePixelSignal[plane][pixel-1][pmt]);
01698 else if( pixel > 7 && pixel < 56 && (pixel)%8==0 )
01699 sumNeighborSignal = (planePixelSignal[plane][pixel-8][pmt] + planePixelSignal[plane][pixel+8][pmt]
01700 + planePixelSignal[plane][pixel+1][pmt]);
01701 else if(pixel==0)
01702 sumNeighborSignal = planePixelSignal[plane][pixel+8][pmt] + planePixelSignal[plane][pixel+1][pmt];
01703 else if(pixel==7)
01704 sumNeighborSignal = planePixelSignal[plane][pixel+8][pmt] + planePixelSignal[plane][pixel-1][pmt];
01705 else if(pixel==56)
01706 sumNeighborSignal = planePixelSignal[plane][pixel-8][pmt] + planePixelSignal[plane][pixel+1][pmt];
01707 else if(pixel==63)
01708 sumNeighborSignal = planePixelSignal[plane][pixel-8][pmt] + planePixelSignal[plane][pixel-1][pmt];
01709 }
01710
01711 return sumNeighborSignal;
01712 }
|
|
|
Definition at line 1715 of file ANtpInfoObjectFillerNC.cxx. References FindNearestNeighborPixelSignal(), fPlanePixelEastSignal, fPlanePixelWestSignal, fPlaneToPMTMapEast, fPlaneToPMTMapWest, fStripIsXTalkEast, fStripIsXTalkWest, fStripToPixelMapEast, fStripToPixelMapWest, MSG, NtpSREvent::nstrip, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRStrip::plane, NtpSRStrip::pmtindex0, NtpSRStrip::pmtindex1, NtpSRPulseHeight::sigcor, NtpSREvent::stp, and NtpSRStrip::strip. 01716 {
01717 MSG("ANtpInfoObjectFillerNC", Msg::kDebug) << "in FindXTalkStrips" << endl;
01718
01719 NtpSRStrip *ntpStrip = 0;
01720
01721 Int_t plane = 0;
01722 Int_t pixelEast = 0;
01723 Int_t pmtEast = 0;
01724 Int_t pixelWest = 0;
01725 Int_t pmtWest = 0;
01726
01727 for(Int_t ns = 0; ns < ntpEvent->nstrip; ++ns){
01728
01729 //get the NtpSRStrip object
01730 if (ntpEvent->stp[ns] >= 0)
01731 ntpStrip = dynamic_cast<NtpSRStrip *>
01732 (fStripArray->At(ntpEvent->stp[ns]));
01733 else continue;
01734 plane = (int)ntpStrip->plane;
01735
01736 if(fDetector == Detector::kFar){
01737 pixelEast = fStripToPixelMapEast[ntpStrip->strip];
01738 pmtEast = 0;
01739 if(fPlaneToPMTMapEast[plane] != ntpStrip->pmtindex0) pmtEast = 1;
01740
01741 if(ntpStrip->ph0.sigcor < 0.1*FindNearestNeighborPixelSignal(plane, pixelEast,
01742 pmtEast, fPlanePixelEastSignal)
01743 || ntpStrip->ph0.sigcor < 90.){
01744 fStripIsXTalkEast[plane][ntpStrip->strip] = 1;
01745 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01746 << "east plane " << plane << " strip " << ntpStrip->strip
01747 << " is xtalk " << ntpStrip->ph0.sigcor << endl;
01748 }
01749
01750 }
01751
01752 pixelWest = fStripToPixelMapWest[ntpStrip->strip];
01753 pmtWest = 0;
01754 if(fPlaneToPMTMapWest[plane] != ntpStrip->pmtindex1) pmtWest = 1;
01755
01756 if(ntpStrip->ph1.sigcor < 0.1*FindNearestNeighborPixelSignal(plane, pixelWest,
01757 pmtWest, fPlanePixelWestSignal)
01758 || ntpStrip->ph1.sigcor < 90.){
01759
01760 fStripIsXTalkWest[plane][ntpStrip->strip] = 1;
01761 MSG("ANtpInfoObjectFillerNC", Msg::kDebug)
01762 << "west plane " << plane << " strip " << ntpStrip->strip
01763 << " is xtalk " << ntpStrip->ph1.sigcor << endl;
01764 }
01765
01766 }//end loop over strips
01767 return;
01768 }
|
|
|
Definition at line 643 of file ANtpInfoObjectFillerNC.cxx. References base, Anp::Interface::Config(), fAnpInterface, Anp::Interface::FillSnarl(), fkNNSet, ANtpRecoNtpManipulator::GetNtpStRecord(), gSystem(), Registry::LockValues(), MSG, Registry::Set(), and Registry::UnLockValues(). Referenced by CondensedNtpModuleNC::Ana(). 00644 {
00645 if(!fkNNSet){
00646 Registry reg;
00647 reg.UnLockValues();
00648 reg.Set("FillkNNKNeighbor", int(41));
00649 reg.Set("FillkNNKeyList", "7001, 7010, 7020, 7040");
00650 reg.Set("FillkNNMinViewNPlane", int(5));
00651 reg.Set("FillkNNKeyBase", int(5200));
00652
00653 // turns on/off gigh screen output level with two keys: yes/no
00654 reg.Set("QuietInterface", "yes");
00655
00656 // specify the complete sequence of algorithms that fill internal data storage
00657 // and process classification analysis
00658 reg.Set("AlgStoreList", "FillHeader, FillShower, FillTrack, FillStrip, FillEvent");
00659 reg.Set("AlgSnarlList", "FillMuonId, FillkNN");
00660
00661 //set the location of the weight files based on the detector
00662 TString weightFileName = "knn.train.far.cedar.daikon.root";
00663 if(fDetector == Detector::kNear) weightFileName = "knn.train.near.cedar.daikon.root";
00664
00665 TString base = getenv("SRT_PRIVATE_CONTEXT");
00666 TString ncutils = "/NCUtils/data/";
00667 if(base != "" && base != "."){
00668 //check that the private context director exists, if not use public context
00669 void *dirptr = gSystem->OpenDirectory(base+ncutils);
00670 if(!dirptr){
00671 base = getenv("SRT_PUBLIC_CONTEXT");
00672 }//end if private context doesnt exist
00673 }//end if private context is defined
00674 else base = getenv("SRT_PUBLIC_CONTEXT");
00675
00676 //check that the public context exists, if not assert false
00677 if(base == ""){
00678 MSG("ANtpInfoObjectFillerNC", Msg::kFatal) << "no SRT_PUBLIC_CONTEXT set"
00679 << endl;
00680 assert(false);
00681 }
00682
00683 TString weightFilePath = base+ncutils+weightFileName;
00684
00685 // MSG("ANtpInfoObjectFillerNC", Msg::kInfo) << "kNN weight files "
00686 // << weightFilePath << endl;
00687
00688 reg.Set("FillkNNFilePath", weightFilePath);
00689
00690 reg.LockValues();
00691
00692 fAnpInterface = new Anp::Interface();
00693 fAnpInterface->Config(reg);
00694 fkNNSet = true;
00695 }
00696 fAnpInterface->FillSnarl(ntpManipulator->GetNtpStRecord());
00697
00698 return;
00699 }
|
|
||||||||||||
|
Definition at line 553 of file ANtpInfoObjectFillerNC.cxx. References base, fAvgCCe, fAvgCCmu, fAvgCCtau, fAvgNC, fPCCe, fPCCmu, fPCCtau, fPNC, fVarCCe, fVarCCmu, fVarCCtau, fVarNC, fVHSPlanes, fVHSStrips, gSystem(), MSG, and VHS::ReadFile(). Referenced by CondensedNtpModuleNC::BeginJob(). 00555 {
00556 //
00557 // Should be called once per job to read in training vectors of:
00558 // 1) image of avg pixel values for NC, CCe, CCmu, & CCtau
00559 // 2) image of variance pixel values for NC, CCe, CCmu, & CCtau
00560 // 3) image of hit probability pixel values for NC, CCe, CCmu, & CCtau
00561 // as well as set the global variables #planes/window & #strips/window
00562 //
00563
00564 // Read info from our input training file
00565 // --> look for it in NCUtils/data/
00566 TString base = getenv("SRT_PRIVATE_CONTEXT");
00567 TString ncutils = "/NCUtils/data/";
00568 if(base != "" && base != "."){
00569 // check that the private context director exists,
00570 // if not use public context
00571 void *dirptr = gSystem->OpenDirectory(base+ncutils);
00572 if(!dirptr){
00573 base = getenv("SRT_PUBLIC_CONTEXT");
00574 }//end if private context doesn't exist
00575 }//end if private context is defined
00576 else base = getenv("SRT_PUBLIC_CONTEXT");
00577
00578 //check that the public context exists, if not assert false
00579 if(base == ""){
00580 MSG("ANtpInfoObjectFillerNC", Msg::kFatal) << "no SRT_PUBLIC_CONTEXT set"
00581 << endl;
00582 assert(false);
00583 }
00584
00585 //set the name of the weight file based on the detector
00586 std::string trainFileName = (fDetector == Detector::kNear)?
00587 "vhstrain.near.rot.20x20c40.daikon.cedar.root" :
00588 "vhstrain.far.rot.20x20c40.daikon.cedar.root" ;
00589 TString trainFilePath = base+ncutils+TString(trainFileName.c_str());
00590
00591 TFile* trainFile = new TFile(trainFilePath);
00592
00593 if ( !trainFile ) {
00594 MSG("ANtpInfoObjectFillerNC",Msg::kFatal)
00595 << "-- VHS training file (" << trainFileName
00596 << ") does not exist in the usual places! Exiting!" << endl;
00597 assert(false);
00598 }
00599
00600 trainFile->cd();
00601 VHS::ReadFile(trainFile,
00602 fAvgNC, fAvgCCe, fAvgCCmu, fAvgCCtau,
00603 fVarNC, fVarCCe, fVarCCmu, fVarCCtau,
00604 fPNC, fPCCe, fPCCmu, fPCCtau,
00605 numPlanes);
00606 fVHSPlanes = numPlanes;
00607 fVHSStrips = numStrips;
00608
00609 return;
00610 }
|
|
|
|
|
|
Definition at line 239 of file ANtpInfoObjectFillerNC.cxx. References fClusterArray. Referenced by CondensedNtpModuleNC::Ana(). 00239 {
00240 fClusterArray = clusters;
00241 }
|
|
|
Reimplemented from ANtpInfoObjectFiller. Definition at line 230 of file ANtpInfoObjectFillerNC.cxx. References FillStripToPixelMaps(). Referenced by CondensedNtpModuleNC::Ana(). 00231 {
00232 // Set the detector. Then fill the strip to pixel maps accordingly
00233 fDetector = detector;
00234 FillStripToPixelMaps();
00235 return;
00236 }
|
|
|
Definition at line 102 of file ANtpInfoObjectFillerNC.h. Referenced by FillTrackInformation(), and InitializekNN(). |
|
|
Definition at line 111 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 112 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 113 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 114 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 104 of file ANtpInfoObjectFillerNC.h. Referenced by FillShowerInformation(), and SetClusterArray(). |
|
|
Definition at line 106 of file ANtpInfoObjectFillerNC.h. Referenced by InitializekNN(). |
|
|
Definition at line 115 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 116 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 117 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 100 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 96 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FindXTalkStrips(). |
|
|
Definition at line 97 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FindXTalkStrips(). |
|
|
Definition at line 87 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FindXTalkStrips(). |
|
|
Definition at line 86 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FindXTalkStrips(). |
|
|
Definition at line 118 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 99 of file ANtpInfoObjectFillerNC.h. Referenced by FillEventInformation(), FillShowerInformation(), FillTrackInformation(), and FindXTalkStrips(). |
|
|
Definition at line 98 of file ANtpInfoObjectFillerNC.h. Referenced by FillEventInformation(), FillShowerInformation(), FillTrackInformation(), and FindXTalkStrips(). |
|
|
Definition at line 89 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), FillStripToPixelMaps(), and FindXTalkStrips(). |
|
|
Definition at line 90 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 92 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 94 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 91 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 93 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 95 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), and FillStripToPixelMaps(). |
|
|
Definition at line 88 of file ANtpInfoObjectFillerNC.h. Referenced by FillPlanePixelSignalArrays(), FillStripToPixelMaps(), and FindXTalkStrips(). |
|
|
Definition at line 119 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 120 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 121 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 122 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 109 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
|
|
Definition at line 110 of file ANtpInfoObjectFillerNC.h. Referenced by FillVHSEvtInfo(), and InitializeVHSTraining(). |
1.3.9.1