• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/gsi-aug12/prod/go4/PADRPC/TPadRpcProc.cxx (r4864/r4000)

Go to the documentation of this file.
00001 #include "TPadRpcProc.h"
00002 
00003 #include "TProfile.h"
00004 #include "TF1.h"
00005 #include "TMath.h"
00006 
00007 TPadRpcProc::TPadRpcProc(const char* name) : TCBMBeamtimeProc(name),
00008 fCrateInputEvent(0),
00009 fTriglogInputEvent(0),
00010 fVftxInputEvent(0),
00011 fOutputEvent(0)
00012 {
00013    TGo4Log::Info("**** TPadRpcProc: Create instance %s" , name );
00014 
00015    fPar = (TPadRpcParam*) MakeParameter("PadRpcPar", "TPadRpcParam");
00016 
00017    fVftxPar = (TVftxParam*) GetParameter("VftxPar");
00018    if( 0 == fVftxPar )
00019       fVftxPar = (TVftxParam*) MakeParameter("VftxPar", "TVftxParam");
00020 
00021    //~ cout<<name<<endl;
00022 
00023    // To be put as preprocessor somewhere ? (T1290Data.h?)
00024    dCaenBinSize     = 25000.0/1024.0;
00025    dRpcCenterOffsetX   = (Double_t)(fPar->uNbPadsX)                 / 2.0;
00026    dRpcCenterOffsetY   = (Double_t)(fPar->uNbPadsY)                 / 2.0;
00027    dRpcCenterOffsetCmX = (Double_t)(fPar->uNbPadsX)*fPar->dPadSizeX / 2.0;
00028    dRpcCenterOffsetCmY = (Double_t)(fPar->uNbPadsY)*fPar->dPadSizeY / 2.0;
00029    cout<<dRpcCenterOffsetX<<"/"<<dRpcCenterOffsetY<<" "<<dRpcCenterOffsetCmX<<"/"<<dRpcCenterOffsetCmY<<endl;
00030 
00031    // Create histograms only if at least one pad define!
00032    if( 0 < fPar->uNbPadsX && 0 < fPar->uNbPadsY )
00033    {
00034       fBeamProfilePadRpcCm =
00035          MakeTH2('D', Form("Rpc/%s/BeamProfileCm%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00036             Form("Beam profile for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00037             fPar->uNbPadsX, -dRpcCenterOffsetCmX, dRpcCenterOffsetCmX,
00038             fPar->uNbPadsY, -dRpcCenterOffsetCmY, dRpcCenterOffsetCmY,
00039             "Pad X [cm]", "Pad Y [cm]" );
00040 
00041       fBeamProfilePadRpc =
00042          MakeTH2('D', Form("Rpc/%s/BeamProfile%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00043             Form("Beam profile for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00044             fPar->uNbPadsX, 0, fPar->uNbPadsX,
00045             fPar->uNbPadsY, 0, fPar->uNbPadsY,
00046             "Pad X []", "Pad Y []" );
00047 
00048       // Multiplicity plots
00049       fMultiplicityPadRpc =
00050             MakeTH1('I', Form("Rpc/%s/Multiplicity%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00051             Form("Pad Multiplicity for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00052             fPar->uNbPadsX*fPar->uNbPadsY, -0.5, fPar->uNbPadsX*fPar->uNbPadsY - 0.5,
00053             "Multiplicity (Number of pads fired simultaneously/event) [pads]" ) ;
00054 
00055       // Cluster multiplicity plots
00056       fClusterMultPadRpc =
00057             MakeTH1('I', Form("Rpc/%s/ClusterMult%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00058             Form("Cluster multiplicity for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00059             (fPar->uNbPadsX*fPar->uNbPadsY)/2 + 1, -0.5, (fPar->uNbPadsX*fPar->uNbPadsY)/2 + 1 - 0.5,
00060             "Cluster multiplicity [clusters]" ) ;
00061 
00062       // Cluster size plots
00063       fClusterSizePadRpc =
00064             MakeTH1('I', Form("Rpc/%s/ClusterSize%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00065             Form("Cluster size for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00066             fPar->uNbPadsX*fPar->uNbPadsY -1, 0.5, fPar->uNbPadsX*fPar->uNbPadsY - 0.5,
00067             "Cluster size [strips]" ) ;
00068 
00069       // Cluster position
00070       if( 1 == fPar->uOrientation )
00071          fClusterProfilePadRpc =
00072                MakeTH2('D', Form("Rpc/%s/BeamProfClusters%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00073                Form("Beam profile using clusters center for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00074                fPar->uNbPadsY, -dRpcCenterOffsetCmY, dRpcCenterOffsetCmY,
00075                fPar->uNbPadsX, -dRpcCenterOffsetCmX, dRpcCenterOffsetCmX,
00076                "X [cm]", "Y [cm]" );
00077          else fClusterProfilePadRpc =
00078                MakeTH2('D', Form("Rpc/%s/BeamProfClusters%s", fPar->sPadRpcName.Data(), fPar->sPadRpcName.Data()),
00079                Form("Beam profile using clusters center for %s, Pad map in option file", fPar->sPadRpcName.Data()) ,
00080                fPar->uNbPadsX, -dRpcCenterOffsetCmX, dRpcCenterOffsetCmX,
00081                fPar->uNbPadsY, -dRpcCenterOffsetCmY, dRpcCenterOffsetCmY,
00082                "X [cm]", "Y [cm]" );
00083    } // if( 0 < fPar->uNbPadsX && 0 < fPar->uNbPadsY )
00084 
00085    TGo4Log::Info("**** TPadRpcProc: Instance %s created", name );
00086 }
00087 
00088 
00089 TPadRpcProc::~TPadRpcProc()
00090 {
00091    cout << "**** TPadRpcProc: Delete instance " << endl;
00092 }
00093 
00094 void TPadRpcProc::InitEvent(TGo4EventElement* outevnt)
00095 {
00096    // first assign input event:
00097    // since input event object is never discarded within processor lifetime,
00098    // we just search for subevent by name once to speed up processing
00099 
00100    if(fCrateInputEvent==0)
00101    {
00102           TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Calibration"));
00103           if(btevent)
00104           {
00105                  fCrateInputEvent=dynamic_cast<TMbsCrateEvent*>(btevent->GetSubEvent("MBSCRATE"));
00106           }
00107           else
00108           {
00109                  fCrateInputEvent=dynamic_cast<TMbsCrateEvent*>(GetInputEvent());
00110           }
00111           if(fCrateInputEvent==0) {
00112                  GO4_STOP_ANALYSIS_MESSAGE("**** TPadRpcProc: Fatal error: no input event TMbsCrateEvent!!! STOP GO4");
00113           }
00114    } // if(fCrateInputEvent==0)
00115    if(fTriglogInputEvent==0)
00116    {
00117           TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Calibration"));
00118           if(btevent)
00119           {
00120                  fTriglogInputEvent=dynamic_cast<TTriglogEvent*>(btevent->GetSubEvent("TRIGLOG"));
00121           }
00122 
00123           if(fTriglogInputEvent==0) {
00124                  GO4_STOP_ANALYSIS_MESSAGE("**** TPadRpcProc: Fatal error: input event is/has not a TTriglogEvent!!! STOP GO4");
00125           }
00126    } // if(fTriglogInputEvent==0)
00127    if(fVftxInputEvent==0)
00128    {
00129           TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent());
00130           if(btevent)
00131           {
00132                  fVftxInputEvent=dynamic_cast<TVftxEvent*>(btevent->GetSubEvent("VFTX"));
00133           }
00134 
00135           if(fVftxInputEvent==0) {
00136                  GO4_STOP_ANALYSIS_MESSAGE("**** TPadRpcProc: Fatal error: input event has no TVftxEvent!!! STOP GO4");
00137           }
00138    } // if(fVftxInputEvent==0)
00139 
00140    // then assign output event
00141    // since output event object is never discarded within processor lifetime,
00142    // we just search for subevent by name once to speed up processing
00143    if(fOutputEvent==0)
00144    {
00145       TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(outevnt);
00146       if(btevent)
00147       {
00148          fOutputEvent=dynamic_cast<TPadRpcEvent*>(btevent->GetSubEvent("PADRPC"));
00149       }
00150       else
00151       {
00152           fOutputEvent=dynamic_cast<TPadRpcEvent*>(btevent->GetSubEvent("PADRPC"));
00153       }
00154       if(fOutputEvent==0) {
00155          GO4_STOP_ANALYSIS_MESSAGE("**** TPadRpcProc: Fatal error: output event is not a TPadRpcEvent!!! STOP GO4");
00156       }
00157       else {
00158          //     BuildEvent(dynamic_cast<TGo4MbsSubEvent*>(btevent->GetSubEvent("MBSCRATE")));
00159       }
00160    }
00161 
00162 }
00163 
00164 void TPadRpcProc::FinalizeEvent()
00165 {
00166    hitCurrent.Clear();
00167    clusterCurrent.Clear();
00168    uLastFiredPadX = fPar->uNbPadsX; // To be sure it's out of range for dead strips on startup
00169    uMultiplicityPadRpc = 0;
00170 
00171    // The trigger selection is active and we have another trigger or no strip is defined => skip processing
00172    if( !( ( -1 == fPar->iTriggerSelection) ||
00173        ( 1 == ((fTriglogInputEvent->fVulomTriggerPattern>>fPar->iTriggerSelection)&0x1 )  ) ) ||
00174          0 == fPar->uNbPadsX || 0 == fPar->uNbPadsY )
00175    {
00176       return;
00177    }
00178 
00179    if( 2 == fPar->uTdcTypePad )
00180    {
00181       // Check that both tdc data are valid and calibrated
00182       if(fCrateInputEvent && fCrateInputEvent->IsValid() &&
00183             fVftxInputEvent && fVftxInputEvent->IsValid() )
00184       {
00185          Double_t dCaenVftxOffset =  0.;
00186          if( -1 < fVftxPar->iMainReferenceTdc )
00187          {
00188             if( -1 < fVftxPar->iVftxReference1Channel[fVftxPar->iMainReferenceTdc] )
00189             {
00190                Bool_t bOffsetOk = kFALSE;
00191                if( -1 < fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc] )
00192                {
00193                   if( -1 < (fCrateInputEvent->fMtdc[ fPar->iOffsetTdcCaen ]).lead_multi[ fPar->iOffsetChannelCaen ][0] &&
00194                       -1 < (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00195                                   fVftxPar->iVftxReference1Channel[fVftxPar->iMainReferenceTdc] ][0] &&
00196                      -1 < (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00197                                   fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc] ][0])
00198                   {
00199                      dCaenVftxOffset =  dCaenBinSize*( (fCrateInputEvent->fMtdc[ fPar->iOffsetTdcCaen ]).lead_multi[ fPar->iOffsetChannelCaen ][0] )
00200                                       - ( (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00201                                                  fVftxPar->iVftxReference1Channel[fVftxPar->iMainReferenceTdc] ][0]
00202                                          +(fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00203                                                  fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc ] ][0])/2.;
00204                      bOffsetOk = kTRUE;
00205                   } // if all times OK
00206                } // if( -1 < fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc] )
00207                if( kFALSE == bOffsetOk )
00208                   if( -1 < (fCrateInputEvent->fMtdc[ fPar->iOffsetTdcCaen ]).lead_multi[ fPar->iOffsetChannelCaen ][0] &&
00209                       -1 < (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00210                                   fVftxPar->iVftxReference1Channel[fVftxPar->iMainReferenceTdc] ][0] )
00211                      dCaenVftxOffset =  dCaenBinSize*( (fCrateInputEvent->fMtdc[ fPar->iOffsetTdcCaen ]).lead_multi[ fPar->iOffsetChannelCaen ][0] )
00212                                       - (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00213                                                  fVftxPar->iVftxReference1Channel[fVftxPar->iMainReferenceTdc] ][0];
00214             } // if( -1 < fVftxPar->iVftxReference1Channel[fVftxPar->iMainReferenceTdc] )
00215                else if( -1 < fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc] )
00216                   if( -1 < (fCrateInputEvent->fMtdc[ fPar->iOffsetTdcCaen ]).lead_multi[ fPar->iOffsetChannelCaen ][0] &&
00217                       -1 < (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00218                                   fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc] ][0] )
00219                      dCaenVftxOffset =  dCaenBinSize*( (fCrateInputEvent->fMtdc[ fPar->iOffsetTdcCaen ]).lead_multi[ fPar->iOffsetChannelCaen ][0] )
00220                                       - (fVftxInputEvent->fVftxBoards[ fVftxPar->iMainReferenceTdc ] ).dTimeCorr[
00221                                                  fVftxPar->iVftxReference2Channel[fVftxPar->iMainReferenceTdc] ][0];
00222          } // if( -1 < fVftxPar->iMainReferenceTdc )
00223 
00224          for(UInt_t temp_indexY = 0; temp_indexY < fPar->uNbPadsY; temp_indexY++)
00225             for(UInt_t temp_indexX = 0; temp_indexX < fPar->uNbPadsX; temp_indexX++)
00226             {
00227                hitCurrent.Clear();
00228                if( 1 == fPar->uTdcPadType[temp_indexY][temp_indexX])
00229                   ProcessVftxPad( temp_indexX, temp_indexY );
00230                   else ProcessCaenPad( temp_indexX, temp_indexY, dCaenVftxOffset );
00231             } //  for( temp_indexY, temp_indexX)
00232       } // if(fCrateInputEvent && fCrateInputEvent->IsValid() && fVftxInputEvent && fVftxInputEvent->IsValid() )
00233    } // if( 2 == fPar->uTdcTypePad )
00234    else if( 1 == fPar->uTdcTypePad )
00235    {
00236       // Check that the VFTX data are valid after calibration
00237       if(fVftxInputEvent && fVftxInputEvent->IsValid())
00238       {
00239          for(UInt_t temp_indexY = 0; temp_indexY < fPar->uNbPadsY; temp_indexY++)
00240             for(UInt_t temp_indexX = 0; temp_indexX < fPar->uNbPadsX; temp_indexX++)
00241             {
00242                hitCurrent.Clear();
00243 
00244                ProcessVftxPad( temp_indexX, temp_indexY );
00245             } //  for( temp_indexY, temp_indexX )
00246       } // if(fVftxInputEvent && fVftxInputEvent->IsValid())
00247    } // if( 2 == fPar->uTdcTypePad ) else if( 1 == fPar->uTdcTypePad )
00248    else
00249    {
00250       // Check that the MBS unpack event is valid
00251       if(fCrateInputEvent && fCrateInputEvent->IsValid())
00252       {
00253          for(UInt_t temp_indexY = 0; temp_indexY < fPar->uNbPadsY; temp_indexY++)
00254             for(UInt_t temp_indexX = 0; temp_indexX < fPar->uNbPadsX; temp_indexX++)
00255             {
00256                hitCurrent.Clear();
00257 
00258                ProcessCaenPad( temp_indexX, temp_indexY );
00259             } //  for( temp_indexY, temp_indexX )
00260       } // if(fCrateInputEvent && fCrateInputEvent->IsValid())
00261 
00262    } // else of if( 2 == fPar->uTdcTypePad )else if( 1 == fPar->uTdcTypePad )
00263 
00264    if( 0 < (clusterCurrent.fHits).size() )
00265    {
00266       clusterCurrent.PositionCalculation( dRpcCenterOffsetCmX, dRpcCenterOffsetCmY,
00267                fPar->uOrientation,
00268                fPar->dPadSizeX, fPar->dPadSizeY );
00269       (fOutputEvent->fClusters).push_back( clusterCurrent );
00270       clusterCurrent.Clear();
00271    } // if( 0 < (clusterCurrent.fHits).size() )
00272 
00273    // Multiplicity graph with Pad RPCs
00274    fMultiplicityPadRpc->Fill( uMultiplicityPadRpc );
00275    // Cluster multiplicity graph with Pad RPCs
00276    fClusterMultPadRpc->Fill( (fOutputEvent->fClusters).size() );
00277    // Cluster size graph with Pad RPCs
00278    for(UInt_t uCluster = 0; uCluster < (fOutputEvent->fClusters).size(); uCluster++)
00279    {
00280       fClusterSizePadRpc->Fill( ( ( (fOutputEvent->fClusters)[uCluster] ).fHits ).size() );
00281       fClusterProfilePadRpc->Fill( ( (fOutputEvent->fClusters)[uCluster] ).dX,
00282                                      ( (fOutputEvent->fClusters)[uCluster] ).dY);
00283    } // for(UInt_t uCluster = 0; uCluster < (fOutputEvent->fClusters).size(); uCluster++)
00284 
00285    fOutputEvent->SetValid(kTRUE);
00286 }
00287 
00288 /**************************************************************************************************/
00289 void TPadRpcProc::ProcessCaenPad( UInt_t uPadIndexX, UInt_t uPadIndexY, Double_t dCaenOtherOffset )
00290 {
00291    // Test if both time are there
00292    if( -1 < (fCrateInputEvent->fMtdc[
00293                fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ]).lead_multi[
00294                      fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0] )
00295    {
00296       fBeamProfilePadRpcCm->Fill( fPar->dPadSizeX*uPadIndexX - dRpcCenterOffsetCmX,
00297                                   fPar->dPadSizeY*uPadIndexY - dRpcCenterOffsetCmY );
00298       fBeamProfilePadRpc->Fill( uPadIndexX, uPadIndexY );
00299 
00300       if( -1 < (fCrateInputEvent->fMtdc[
00301                   fPar->uTdcPadTot[uPadIndexY][uPadIndexX] ]).lead_multi[
00302                      fPar->uChannelPadTot[uPadIndexY][uPadIndexX] ][0] )
00303       {
00304          uMultiplicityPadRpc ++;
00305 
00306          hitCurrent.iPadIndexX     = uPadIndexX ;
00307          hitCurrent.iPadIndexY     = uPadIndexY ;
00308          // Store time including offset!
00309          hitCurrent.dTime  = dCaenBinSize*(
00310                (fCrateInputEvent->fMtdc[ fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ]).lead_multi[
00311                                        fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0] )
00312                                  + fPar->dOffsetList[uPadIndexY][uPadIndexX]
00313                                  - dCaenOtherOffset;
00314          // Store tot including offset and gain!
00315          hitCurrent.dTot   =
00316             ( (fCrateInputEvent->fMtdc[ fPar->uTdcPadTot[uPadIndexY][uPadIndexX] ]).trail_multi[
00317                                     fPar->uChannelPadTot[uPadIndexY][uPadIndexX]][0]
00318              -(fCrateInputEvent->fMtdc[ fPar->uTdcPadTime[uPadIndexY][uPadIndexX]  ]).lead_multi[
00319                                     fPar->uChannelPadTot[uPadIndexY][uPadIndexX] ][0]
00320             )*fPar->dToTGainList[uPadIndexY][uPadIndexX]*dCaenBinSize
00321             - fPar->dTotOffsetList[uPadIndexY][uPadIndexX];
00322 
00323          (clusterCurrent.fHits).push_back(hitCurrent);
00324          clusterCurrent.PositionCalculation( dRpcCenterOffsetCmX, dRpcCenterOffsetCmY,
00325                   fPar->uOrientation,
00326                   fPar->dPadSizeX, fPar->dPadSizeY );
00327          (fOutputEvent->fClusters).push_back( clusterCurrent );
00328          clusterCurrent.Clear();
00329       }// if valid Tot
00330    } // if( valid on both ends!)
00331    return;
00332 }
00333 void TPadRpcProc::ProcessVftxPad( UInt_t uPadIndexX, UInt_t uPadIndexY, Double_t dVftxOtherOffset )
00334 {
00335    // Test if both time are there
00336    if( -1 < (fVftxInputEvent->fVftxBoards[
00337                fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ] ).dTimeCorr[
00338                   fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0] )
00339    {
00340       fBeamProfilePadRpcCm->Fill( fPar->dPadSizeX*uPadIndexX - dRpcCenterOffsetCmX,
00341                                   fPar->dPadSizeY*uPadIndexY - dRpcCenterOffsetCmY );
00342       fBeamProfilePadRpc->Fill( uPadIndexX, uPadIndexY );
00343 
00344       // Check Right tot is there
00345       if( -1 < (fVftxInputEvent->fVftxBoards[
00346                      fPar->uTdcPadTot[uPadIndexY][uPadIndexX] ] ).dTimeCorr[
00347                         fPar->uChannelPadTot[uPadIndexY][uPadIndexX] ][0] )
00348       {
00349          uMultiplicityPadRpc ++;
00350 
00351          hitCurrent.iPadIndexX     = uPadIndexX ;
00352          hitCurrent.iPadIndexY     = uPadIndexY ;
00353          // Store time including offset!
00354          hitCurrent.dTime  = (fVftxInputEvent->fVftxBoards[
00355                                      fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ] ).dTimeCorr[
00356                                        fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0]
00357                               + fPar->dOffsetList[uPadIndexY][uPadIndexX]
00358                               - dVftxOtherOffset
00359                               - CLOCK_TIME*( 1 == fVftxPar->uAutomaticOffsetEnable?
00360                                     fVftxPar->iAutomaticTdcOffset[ fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ] : 0.0);
00361 
00362          // Store tot including offset and gain!
00363          // Missing the offset for the coarse counter overflow!!!!
00364          hitCurrent.dTot   =
00365                (fVftxInputEvent->fVftxBoards[ fPar->uTdcPadTot[uPadIndexY][uPadIndexX] ] ).dTimeCorr[
00366                   fPar->uChannelPadTot[uPadIndexY][uPadIndexX]  ][0]
00367              - (fVftxInputEvent->fVftxBoards[ fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ] ).dTimeCorr[
00368                   fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0];
00369          if( 1000 < (fVftxInputEvent->fVftxBoards[ fPar->uTdcPadTot[uPadIndexY][uPadIndexX] ]).iCoarseTime[
00370                         fPar->uChannelPadTot[uPadIndexY][uPadIndexX] ][0]
00371                   - (fVftxInputEvent->fVftxBoards[ fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ]).iCoarseTime[
00372                         fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0] )
00373             hitCurrent.dTot -= ((TDC_FIFO_COARSE_CT>>TDC_FIFO_COARSE_CT_SHIFT)+1)*(Double_t)CLOCK_TIME;
00374 
00375          if( (fVftxInputEvent->fVftxBoards[ fPar->uTdcPadTot[uPadIndexY][uPadIndexX] ]).iCoarseTime[
00376                         fPar->uChannelPadTot[uPadIndexY][uPadIndexX] ][0]
00377             - (fVftxInputEvent->fVftxBoards[ fPar->uTdcPadTime[uPadIndexY][uPadIndexX] ]).iCoarseTime[
00378                   fPar->uChannelPadTime[uPadIndexY][uPadIndexX] ][0]  < 1000)
00379             hitCurrent.dTot += ((TDC_FIFO_COARSE_CT>>TDC_FIFO_COARSE_CT_SHIFT)+1)*(Double_t)CLOCK_TIME;
00380 
00381          hitCurrent.dTot *= fPar->dToTGainList[uPadIndexY][uPadIndexX];
00382          hitCurrent.dTot -= fPar->dTotOffsetList[uPadIndexY][uPadIndexX];
00383 
00384          (clusterCurrent.fHits).push_back(hitCurrent);
00385          clusterCurrent.PositionCalculation( dRpcCenterOffsetCmX, dRpcCenterOffsetCmY,
00386                   fPar->uOrientation,
00387                   fPar->dPadSizeX, fPar->dPadSizeY );
00388          (fOutputEvent->fClusters).push_back( clusterCurrent );
00389          clusterCurrent.Clear();
00390       }// if valid tot
00391    } // if( valid on both ends!)
00392 
00393    return;
00394 }
00395 /**************************************************************************************************/

Generated on Tue Dec 10 2013 04:52:21 for ROCsoft by  doxygen 1.7.1