00001 #include "TMatchingProc.h"
00002
00003 #include "TMath.h"
00004 #include "TF1.h"
00005 #include "TFitResult.h"
00006 #include "TLatex.h"
00007
00008 TMatchingProc::TMatchingProc(const char* name) : TCBMBeamtimeProc(name),
00009 fCrateInputEvent(0),
00010 fTriglogInputEvent(0),
00011 fVftxInputEvent(0),
00012 fRpcHdInputEvent(0),
00013 fRpcBucInputEvent(0),
00014 fRpcBucMod1InputEvent(0),
00015 fRpcBucMod2InputEvent(0),
00016 fRpcBucMod3InputEvent(0),
00017 fRpcBucMod4InputEvent(0),
00018 fScalersInputEvent(0),
00019 fOutputEvent(0)
00020 {
00021 TGo4Log::Info("**** TMatchingProc: Create instance %s" , name );
00022
00023 fPar = (TMatchingParam*) MakeParameter("MatchingPar", "TMatchingParam");
00024
00025 fParRpcHd = (TRpcParam*) MakeParameter("RpcPar_Hd", "TRpcParam");
00026 fParRpcBuc = (TRpcParam*) MakeParameter("RpcPar_Buc_Ref", "TRpcParam");
00027
00028 fParRpcBucMod1 = (TRpcParam*) GetParameter("RpcPar_Buc_Mod1");
00029 if( 0 == fParRpcBucMod1)
00030 cout<<"Parameter for Bucarest Module Rpc 1 not found => Matching Histo disabled"<<endl;
00031 fParRpcBucMod2 = (TRpcParam*) GetParameter("RpcPar_Buc_Mod2");
00032 if( 0 == fParRpcBucMod2)
00033 cout<<"Parameter for Bucarest Module Rpc 2 not found => Matching Histo disabled"<<endl;
00034 fParRpcBucMod3 = (TRpcParam*) GetParameter("RpcPar_Buc_Mod3");
00035 if( 0 == fParRpcBucMod3)
00036 cout<<"Parameter for Bucarest Module Rpc 3 not found => Matching Histo disabled"<<endl;
00037 fParRpcBucMod4 = (TRpcParam*) GetParameter("RpcPar_Buc_Mod4");
00038 if( 0 == fParRpcBucMod4)
00039 cout<<"Parameter for Bucarest Module Rpc 4 not found => Matching Histo disabled"<<endl;
00040
00041
00042 fMatchingMulHdMulBuc =
00043 MakeTH2('D', Form("Matching/fMatchingMul%sMul%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00044 Form("Mul %s vs Mul %s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00045 20, 0, 20,
00046 20, 0, 20,
00047 Form("Mul %s", fParRpcHd->sStripRpcName.Data()),
00048 Form("Mul %s", fParRpcBuc->sStripRpcName.Data()) );
00049
00050 fMatchingMulHdMulBucBigSizeBuc =
00051 MakeTH2('D', Form("Matching/fMatchingBigBucMul%sMul%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00052 Form("Mul %s vs Mul %s, at least 1 Buc size>1", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00053 20, 0, 20,
00054 20, 0, 20,
00055 Form("Mul %s", fParRpcHd->sStripRpcName.Data()),
00056 Form("Mul %s", fParRpcBuc->sStripRpcName.Data()) );
00057
00058
00059 fXMatchingMul1 =
00060 MakeTH2('D', Form("Matching/fMul1XMatching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00061 Form("%s Clusters X vs %s Clusters X, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00062 300, -150, 150,
00063 300, -150, 150,
00064 Form("%s Clusters X [cm]", fParRpcHd->sStripRpcName.Data()),
00065 Form("%s Clusters X [cm]", fParRpcBuc->sStripRpcName.Data()) );
00066 fYMatchingMul1 =
00067 MakeTH2('D', Form("Matching/fMul1YMatching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00068 Form("%s Clusters Y vs %s Clusters Y, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00069 300, -150, 150,
00070 300, -150, 150,
00071 Form("%s Clusters Y [cm]", fParRpcHd->sStripRpcName.Data()),
00072 Form("%s Clusters Y [cm]", fParRpcBuc->sStripRpcName.Data()) );
00073 fMatchingMul1 =
00074 MakeTH2('D', Form("Matching/fMul1Matching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00075 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00076 400, -50, 50,
00077 400, -50, 50,
00078 "dX [cm]", "dY [cm]" ) ;
00079
00080 fMatchingMulBuc1 =
00081 MakeTH2('D', Form("Matching/fMulBuc1Matching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00082 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in Buc RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00083 400, -100, 100,
00084 400, -100, 100,
00085 "dX [cm]", "dY [cm]" ) ;
00086
00087
00088 fBucMulVsRate =
00089 MakeTH2('D', Form("Matching/fBucMulVsRate_%s_", fParRpcBuc->sStripRpcName.Data()),
00090 Form("%s Clusters: nb cluster vs rate in Buc RPC ", fParRpcBuc->sStripRpcName.Data()) ,
00091 1600, 0, 40000,
00092 fParRpcBuc->uNbStrips/2, 0, fParRpcBuc->uNbStrips/2,
00093 "Rate [Hz/cm^2]", "Nb clusters []" ) ;
00094 fHdMulVsRate =
00095 MakeTH2('D', Form("Matching/fHdMulVsRate_%s_", fParRpcHd->sStripRpcName.Data()),
00096 Form("%s Clusters: nb cluster vs rate in Hd RPC ", fParRpcHd->sStripRpcName.Data()) ,
00097 1600, 0, 40000,
00098 fParRpcHd->uNbStrips/2, 0, fParRpcHd->uNbStrips/2,
00099 "Rate [Hz/cm^2]", "Nb clusters []" ) ;
00100
00101
00102 fBucMul1Rate =
00103 MakeTH1('D', Form("Matching/fBucMul1Rate_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00104 Form("%s Clusters: nb events with 1 cluster in Buc RPC vs Rate", fParRpcBuc->sStripRpcName.Data()) ,
00105 800, 0, 400000,
00106 "Rate [Hz]", "Events []" ) ;
00107 fHdMulBucMul1Rate =
00108 MakeTH1('D', Form("Matching/fHdMulBucMul1Rate_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00109 Form("%s vs %s Clusters: nb events with 1 cluster in Buc RPC & >1 cluster in Hd RPC vs rate",
00110 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00111 800, 0, 400000,
00112 "Rate [cm]", "Events []" ) ;
00113
00114
00115 fHdEffVsRateBucMul1 = (TProfile*)GetHistogram( Form("Matching/Efficiency/fHdEffVsRateBucMul1_%s_%s",
00116 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data() ) );
00117 if( 0 == fHdEffVsRateBucMul1 )
00118 {
00119 fHdEffVsRateBucMul1 = new TProfile( Form("fHdEffVsRateBucMul1_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00120 Form("%s vs %s Clusters: efficiency of Hd RPC vs rate in events with 1 cluster in Buc RPC; Rate [Hz/cm^2]; Efficiency [%%]",
00121 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data() ) ,
00122 500, 0, 20000
00123 );
00124 AddHistogram( fHdEffVsRateBucMul1, "Matching/Efficiency/" );
00125 }
00126 fHdEffVsRateBucMul1Ok = (TProfile*)GetHistogram( Form("Matching/Efficiency/fHdEffVsRateBucMul1Ok_%s_%s",
00127 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data() ) );
00128 if( 0 == fHdEffVsRateBucMul1Ok )
00129 {
00130 fHdEffVsRateBucMul1Ok = new TProfile( Form("fHdEffVsRateBucMul1Ok_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00131 Form("%s vs %s Clusters: efficiency of Hd RPC vs rate in events with 1 cluster in Buc RPC matching; Rate [Hz/cm^2]; Efficiency [%%]",
00132 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data() ) ,
00133 500, 0, 20000
00134 );
00135 AddHistogram( fHdEffVsRateBucMul1Ok, "Matching/Efficiency/" );
00136 }
00137
00138 fHdEffVsTimeBucMul1 = (TProfile*)GetHistogram( Form("Matching/Efficiency/fHdEffVsTimeBucMul1_%s_%s",
00139 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data() ) );
00140 if( 0 == fHdEffVsTimeBucMul1 )
00141 {
00142 fHdEffVsTimeBucMul1 = new TProfile( Form("fHdEffVsTimeBucMul1_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00143 "Efficiency of Hd RPC vs time in events with 1 cluster in Buc RPC; Time [s]; Efficiency [%]",
00144 36000, 0, 3600);
00145 AddHistogram( fHdEffVsTimeBucMul1, "Matching/Efficiency/" );
00146 }
00147 fHdEffVsTimeBucMul1Ok = (TProfile*)GetHistogram( Form("Matching/Efficiency/fHdEffVsTimeBucMul1Ok_%s_%s",
00148 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data() ) );
00149 if( 0 == fHdEffVsTimeBucMul1Ok )
00150 {
00151 fHdEffVsTimeBucMul1Ok = new TProfile( Form("fHdEffVsTimeBucMul1Ok_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00152 "Efficiency of Hd RPC vs time in events with 1 cluster in Buc RPC matching; Time [s]; Efficiency [%]",
00153 36000, 0, 3600);
00154 AddHistogram( fHdEffVsTimeBucMul1Ok, "Matching/Efficiency/" );
00155 }
00156
00157 fuNbEventsSummed = 0;
00158 fuNbEventsWithBucMul1 = 0;
00159 fuNbEventsWithBucMul1Hd = 0;
00160 fuNbEventsWithBucMul1HdOk = 0;
00161 fdBucRatesSummed = 0.0;
00162
00163
00164 fHdEffVsBucSizeMul1 =
00165 MakeTH1('D', Form("Matching/Efficiency/fHdEffVsBucSizeMul1_%s_%s",
00166 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00167 "Efficiency of Hd RPC vs buc cluster size in events with 1 cluster in Buc RPC" ,
00168 fParRpcBuc->uNbStrips -1, 1, fParRpcBuc->uNbStrips,
00169 "Cluster Size []", "Efficiency [%]" ) ;
00170 fHdEffVsBucSizeMul1Ok =
00171 MakeTH1('D', Form("Matching/Efficiency/fHdEffVsBucSizeMul1Ok_%s_%s",
00172 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00173 "Efficiency of Hd RPC vs buc cluster size in events with 1 cluster matching in Buc RPC" ,
00174 fParRpcBuc->uNbStrips -1, 1, fParRpcBuc->uNbStrips,
00175 "Cluster Size []", "Efficiency [%]" ) ;
00176 for( UInt_t uClusterSize = 0; uClusterSize < fParRpcBuc->uNbStrips; uClusterSize++)
00177 {
00178 fiNbEventsWith1BigBucCl[uClusterSize] = 0;
00179 fiNbEventsWith1BigBucClHd[uClusterSize] = 0;
00180 fiNbEventsWith1BigBucClHdOk[uClusterSize] = 0;
00181 }
00182 fHdEffBuMul1BucSize2 = new TLatex(0.5,0.5,"-- demo text --");
00183 fHdEffBuMul1BucSize2->SetName("FullEffHd");
00184 fHdEffBuMul1BucSize2->SetNDC();
00185 AddObject(fHdEffBuMul1BucSize2);
00186
00187 if( 1 == fPar->uTriggerSelDebugHistos)
00188 for(Int_t iTrigger = 0; iTrigger<16; iTrigger++)
00189 fMatchingMul1TriggerDebug[iTrigger] =
00190 MakeTH2('D', Form("Matching/TrigSel/fMul1MatchingTrig%d_%s_%s", iTrigger, fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00191 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC and trigger %d",
00192 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data(), iTrigger) ,
00193 80, -20, 20,
00194 80, -20, 20,
00195 "dX [cm]", "dY [cm]" ) ;
00196
00197 fXMatchingMul1StripHd =
00198 MakeTH2('D', Form("Matching/StripSel/fXMatchingMul1StripHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00199 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00200 400, -100, 100,
00201 fParRpcHd->uNbStrips, -0.5, fParRpcHd->uNbStrips -0.5,
00202 "dX [cm]", "Strip []" ) ;
00203 fYMatchingMul1StripHd =
00204 MakeTH2('D', Form("Matching/StripSel/fYMatchingMul1StripHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00205 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00206 400, -100, 100,
00207 fParRpcHd->uNbStrips, -0.5, fParRpcHd->uNbStrips -0.5,
00208 "dY [cm]", "Strip []" ) ;
00209 fMatchingMul1StripHd = (TH3*)GetHistogram(Form("Matching/StripSel/fMul1MatchingStripHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00210 if( 0 == fMatchingMul1StripHd )
00211 {
00212 fMatchingMul1StripHd = new TH3I
00213 ( Form("fMul1MatchingStripHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00214 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC; dX [cm]; dY [cm]; Strip []",
00215 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00216 400, -100, 100,
00217 400, -100, 100,
00218 fParRpcHd->uNbStrips, -0.5, fParRpcHd->uNbStrips -0.5 ) ;
00219 AddHistogram( fMatchingMul1StripHd, "Matching/StripSel/" );
00220 }
00221
00222 fXMatchingMul1DtHd =
00223 MakeTH2('D', Form("Matching/TimeSel/fXMatchingMul1DtHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00224 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00225 400, -100, 100,
00226 60, -30 ,30,
00227 "dX [cm]", "X Hd (From Dt) [cm]" ) ;
00228 fYMatchingMul1DtHd =
00229 MakeTH2('D', Form("Matching/TimeSel/fYMatchingMul1DtHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00230 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00231 400, -100, 100,
00232 60, -30 ,30,
00233 "dY [cm]", "X Hd (From Dt) [cm]" ) ;
00234
00235 fTMatchingMul1StripHd =
00236 MakeTH2('D', Form("Matching/StripSel/fTMatchingMul1StripHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00237 Form("%s vs %s Clusters: Dt, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00238 2000, -20000, 20000,
00239 fParRpcHd->uNbStrips, -0.5, fParRpcHd->uNbStrips -0.5,
00240 "Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps]", "Strip []", "Counts []" ) ;
00241 fTMatchingMul1DtHd =
00242 MakeTH2('D', Form("Matching/TimeSel/fTMatchingMul1DtHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00243 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00244 2000, -20000, 20000,
00245 60, -30 ,30,
00246 "Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps]", "X Hd (From Dt) [cm]", "Counts []" ) ;
00247
00248 fXMatchingMul1StripBuc =
00249 MakeTH2('D', Form("Matching/StripSel/fXMatchingMul1StripBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00250 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00251 400, -100, 100,
00252 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00253 "dX [cm]", "Strip []" ) ;
00254 fYMatchingMul1StripBuc =
00255 MakeTH2('D', Form("Matching/StripSel/fYMatchingMul1StripBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00256 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00257 400, -100, 100,
00258 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00259 "dY [cm]", "Strip []" ) ;
00260 fMatchingMul1StripBuc = (TH3*)GetHistogram(Form("Matching/StripSel/fMul1MatchingStripBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00261 if( 0 == fMatchingMul1StripBuc )
00262 {
00263 fMatchingMul1StripBuc = new TH3I
00264 ( Form("fMul1MatchingStripBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00265 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC; dX [cm]; dY [cm]; Strip []",
00266 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00267 400, -100, 100,
00268 400, -100, 100,
00269 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5 ) ;
00270 AddHistogram( fMatchingMul1StripBuc, "Matching/StripSel/" );
00271 }
00272
00273 fXMatchingMul1DtBuc =
00274 MakeTH2('D', Form("Matching/TimeSel/fXMatchingMul1DtBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00275 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00276 400, -100, 100,
00277 20, -10 ,10,
00278 "dX [cm]", "Y Buc (From Dt) [cm]" ) ;
00279 fYMatchingMul1DtBuc =
00280 MakeTH2('D', Form("Matching/TimeSel/fYMatchingMul1DtBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00281 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00282 400, -100, 100,
00283 20, -10 ,10,
00284 "dY [cm]", "Y Buc (From Dt) [cm]" ) ;
00285
00286 fTMatchingMul1StripBuc =
00287 MakeTH2('D', Form("Matching/StripSel/fTMatchingMul1StripBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00288 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00289 2000, -20000, 20000,
00290 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00291 "Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps]", "Strip []" ) ;
00292 fTMatchingMul1DtBuc =
00293 MakeTH2('D', Form("Matching/TimeSel/fTMatchingMul1DtBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00294 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00295 2000, -20000, 20000,
00296 20, -10 ,10,
00297 "Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps]", "Y Buc (From Dt) [cm]" ) ;
00298
00299
00300 fTMatchingMul1StripTotLeftHd = (TH3*)GetHistogram(Form("Matching/StripTot/fTMatchingMul1StripTotLeftHd_%s_%s",
00301 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00302 if( 0 == fTMatchingMul1StripTotLeftHd )
00303 {
00304 fTMatchingMul1StripTotLeftHd = new TH3I
00305 ( Form("fTMatchingMul1StripTotLeftHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00306 Form("%s vs %s Clusters: dT vs strip vs tot left, events with 1 cluster in each RPC;Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps];Strip Hd[];Tot left %s [ps]",
00307 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data(), fParRpcHd->sStripRpcName.Data()) ,
00308 1000, -10000, 10000,
00309 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00310 100, 0, 10000
00311 ) ;
00312 AddHistogram( fTMatchingMul1StripTotLeftHd, "Matching/StripTot/" );
00313 }
00314 fTMatchingMul1StripTotRightHd = (TH3*)GetHistogram(Form("Matching/StripTot/fTMatchingMul1StripTotRightHd_%s_%s",
00315 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00316 if( 0 == fTMatchingMul1StripTotRightHd )
00317 {
00318 fTMatchingMul1StripTotRightHd = new TH3I
00319 ( Form("fTMatchingMul1StripTotRightHd_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00320 Form("%s vs %s Clusters: dT vs strip vs tot right, events with 1 cluster in each RPC;Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps];Strip Hd[];Tot right %s [ps",
00321 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data(), fParRpcHd->sStripRpcName.Data()) ,
00322 1000, -10000, 10000,
00323 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00324 100, 0, 10000
00325 ) ;
00326 AddHistogram( fTMatchingMul1StripTotRightHd, "Matching/StripTot/" );
00327 }
00328 fTMatchingMul1StripTotLeftBuc = (TH3*)GetHistogram(Form("Matching/StripTot/fTMatchingMul1StripTotLeftBuc_%s_%s",
00329 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00330 if( 0 == fTMatchingMul1StripTotLeftBuc )
00331 {
00332 fTMatchingMul1StripTotLeftBuc = new TH3I
00333 (Form("fTMatchingMul1StripTotLeftBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00334 Form("%s vs %s Clusters: dT vs strip vs tot left, events with 1 cluster in each RPC;Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps];Strip Buc[];Tot left %s [ps]",
00335 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00336 1000, -10000, 10000,
00337 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00338 100, 0, 10000
00339 ) ;
00340 AddHistogram( fTMatchingMul1StripTotLeftBuc, "Matching/StripTot/" );
00341 }
00342 fTMatchingMul1StripTotRightBuc = (TH3*)GetHistogram(Form("Matching/StripTot/fTMatchingMul1StripTotRightBuc_%s_%s",
00343 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00344 if( 0 == fTMatchingMul1StripTotRightBuc )
00345 {
00346 fTMatchingMul1StripTotRightBuc = new TH3I
00347 (Form("fTMatchingMul1StripTotRightBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00348 Form("%s vs %s Clusters: dT vs strip vs tot right, events with 1 cluster in each RPC;Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps];Strip Buc[];Tot right %s [ps",
00349 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00350 1000, -10000, 10000,
00351 fParRpcBuc->uNbStrips, -0.5, fParRpcBuc->uNbStrips -0.5,
00352 100, 0, 10000
00353 ) ;
00354 AddHistogram( fTMatchingMul1StripTotRightBuc, "Matching/StripTot/" );
00355 }
00356
00357 fDtMul1 =
00358 MakeTH1('D', Form("Matching/fMul1Dt_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00359 Form("%s vs %s Clusters: Mean time difference, events with 1 clusters in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00360 40000, -200000, 200000,
00361 "Dt = Cluster Mean time(HD) - Cluster Mean time(BUC) [ps]", "Counts []" ) ;
00362
00363 fMatchingDtMul1 = (TH3*)GetHistogram(Form("Matching/fMatchingDtMul1_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) );
00364 if( 0 == fMatchingDtMul1 )
00365 {
00366 fMatchingDtMul1 = new TH3I
00367 ( Form("fMatchingDtMul1_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00368 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC; dX [cm]; dY [cm]; dT [ps]",
00369 fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00370 80, -20, 20,
00371 80, -20, 20,
00372 500, -60000, -10000
00373 ) ;
00374 AddHistogram( fMatchingDtMul1, "Matching/" );
00375 }
00376
00377
00378 fXMatchingMul2 =
00379 MakeTH2('D', Form("Matching/fMul2XMatching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00380 Form("%s Clusters X vs %s Clusters X, events with 1-2 clusters in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00381 300, -150, 150,
00382 300, -150, 150,
00383 Form("%s Clusters X [cm]", fParRpcHd->sStripRpcName.Data()),
00384 Form("%s Clusters X [cm]", fParRpcBuc->sStripRpcName.Data()) );
00385 fYMatchingMul2 =
00386 MakeTH2('D', Form("Matching/fMul2YMatching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00387 Form("%s Clusters Y vs %s Clusters Y, events with 1-2 clusters in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00388 300, -150, 150,
00389 300, -150, 150,
00390 Form("%s Clusters Y [cm]", fParRpcHd->sStripRpcName.Data()),
00391 Form("%s Clusters Y [cm]", fParRpcBuc->sStripRpcName.Data()) );
00392 fMatchingMul2 =
00393 MakeTH2('D', Form("Matching/fMul2Matching_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00394 Form("%s vs %s Clusters: dX / dY, events with 1-2 clusters in each RPC", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00395 400, -100, 100,
00396 400, -100, 100,
00397 "dX [cm]", "dY [cm]" ) ;
00398
00399 fFluxHdLeftEvolution = (TProfile*)GetHistogram( "Matching/fFluxHdLeftEvolution" );
00400 if( 0 == fFluxHdLeftEvolution )
00401 {
00402 fFluxHdLeftEvolution = new TProfile( "fFluxHdLeftEvolution",
00403 "Evolution of flux on Heidelberg counter; Time [s]; Rate [Hz/cm^2]",
00404 36000, 0, 3600);
00405 AddHistogram( fFluxHdLeftEvolution, "Matching/" );
00406 }
00407 fFluxHdRightEvolution = (TProfile*)GetHistogram( "Matching/fFluxHdRightEvolution" );
00408 if( 0 == fFluxHdRightEvolution )
00409 {
00410 fFluxHdRightEvolution = new TProfile( "fFluxHdRightEvolution",
00411 "Evolution of flux on Heidelberg counter; Time [s]; Rate [Hz/cm^2]",
00412 36000, 0, 3600);
00413 AddHistogram( fFluxHdRightEvolution, "Matching/" );
00414 }
00415 #if SCALORMU_NB_SCAL == 16
00416
00417 fFluxBucEvolution = (TProfile*)GetHistogram( "Matching/fFluxBucEvolution" );
00418 if( 0 == fFluxBucEvolution )
00419 {
00420 fFluxBucEvolution = new TProfile( "fFluxBucEvolution",
00421 "Evolution of flux on Buc Reference counter; Time [s]; Rate [Hz/cm^2]",
00422 36000, 0, 3600);
00423 AddHistogram( fFluxBucEvolution, "Matching/" );
00424 }
00425 #else
00426
00427 fFluxBucLeftEvolution = (TProfile*)GetHistogram( "Matching/fFluxBucLeftEvolution" );
00428 if( 0 == fFluxBucLeftEvolution )
00429 {
00430 fFluxBucLeftEvolution = new TProfile( "fFluxBucLeftEvolution",
00431 "Evolution of flux on Buc Reference counter; Time [s]; Rate [Hz/cm^2]",
00432 36000, 0, 3600);
00433 AddHistogram( fFluxBucLeftEvolution, "Matching/" );
00434 }
00435 fFluxBucRightEvolution = (TProfile*)GetHistogram( "Matching/fFluxBucRightEvolution" );
00436 if( 0 == fFluxBucRightEvolution )
00437 {
00438 fFluxBucRightEvolution = new TProfile( "fFluxBucRightEvolution",
00439 "Evolution of flux on Buc Reference counter; Time [s]; Rate [Hz/cm^2]",
00440 36000, 0, 3600);
00441 AddHistogram( fFluxBucRightEvolution, "Matching/" );
00442 }
00443 #endif
00444 fFluxComparisonHdLeftBuc =
00445 MakeTH2('D', Form("Matching/fFluxComparisonHdLeftBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00446 Form("%s vs %s Clusters: comparison of fluxes in Heidelberg and Buc Reference", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00447 1000, -10, 19990,
00448 1000, -10, 19990,
00449 "Rate [Hz/cm^2]", "Rate [Hz/cm^2]", "Events []" ) ;
00450 fFluxComparisonHdRightBuc =
00451 MakeTH2('D', Form("Matching/fFluxComparisonHdRightBuc_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00452 Form("%s vs %s Clusters: comparison of fluxes in Heidelberg and Buc Reference", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00453 1000, -10, 19990,
00454 1000, -10, 19990,
00455 "Rate [Hz/cm^2]", "Rate [Hz/cm^2]", "Events []" ) ;
00456
00457 if( 0 != fParRpcBucMod1)
00458 {
00459 fFluxBucMod1Evolution = new TProfile( "fFluxBucMod1Evolution",
00460 "Evolution of flux on RPC counter 1 in new module; Time [s]; Rate [Hz/cm^2]",
00461 36000, 0, 3600);
00462 AddHistogram( fFluxBucMod1Evolution, "Matching/BucMod/" );
00463 if( 0 != fParRpcBucMod2)
00464 {
00465 fMatchingMod12Mul1 =
00466 MakeTH2('D', Form("Matching/BucMod/fMatching_%s_%s_Mul1", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod2->sStripRpcName.Data()),
00467 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod2->sStripRpcName.Data()) ,
00468 400, -50, 50,
00469 400, -50, 50,
00470 "dX [cm]", "dY [cm]" ) ;
00471 fMatchingTvsDistMod12Mul1 =
00472 MakeTH2('D', Form("Matching/BucMod/fMatchingTvsDist_%s_%s_Mul1", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod2->sStripRpcName.Data()),
00473 Form("%s vs %s Clusters: Time difference vs Cluster distance, events with 1 cluster in each RPC", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod2->sStripRpcName.Data()) ,
00474 2000, -10000, 10000,
00475 100, -5, 5,
00476 Form("T_%s - T_%s [ps]", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod2->sStripRpcName.Data()),
00477 "Sqrt((X-X)^2+(Y-Y)^2) [cm]") ;
00478 }
00479
00480 if( 0 != fParRpcBucMod3)
00481 {
00482 fMatchingMod13Mul1 =
00483 MakeTH2('D', Form("Matching/BucMod/fMatching_%s_%s_Mul1", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod3->sStripRpcName.Data()),
00484 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod3->sStripRpcName.Data()) ,
00485 400, -50, 50,
00486 400, -50, 50,
00487 "dX [cm]", "dY [cm]" ) ;
00488 fMatchingTvsDistMod13Mul1 =
00489 MakeTH2('D', Form("Matching/BucMod/fMatchingTvsDist_%s_%s_Mul1", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod3->sStripRpcName.Data()),
00490 Form("%s vs %s Clusters: Time difference vs Cluster distance, events with 1 cluster in each RPC", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod3->sStripRpcName.Data()) ,
00491 2000, -10000, 10000,
00492 100, -5, 5,
00493 Form("T_%s - T_%s [ps]", fParRpcBucMod1->sStripRpcName.Data(), fParRpcBucMod3->sStripRpcName.Data()),
00494 "Sqrt((X-X)^2+(Y-Y)^2) [cm]") ;
00495 }
00496 }
00497 if( 0 != fParRpcBucMod2)
00498 {
00499 fFluxBucMod2Evolution = new TProfile( "fFluxBucMod2Evolution",
00500 "Evolution of flux on RPC counter 2 in new module; Time [s]; Rate [Hz/cm^2]",
00501 36000, 0, 3600);
00502 AddHistogram( fFluxBucMod2Evolution, "Matching/BucMod/" );
00503
00504 if( 0 != fParRpcBucMod4)
00505 {
00506 fMatchingMod24Mul1 =
00507 MakeTH2('D', Form("Matching/BucMod/fMatching_%s_%s_Mul1", fParRpcBucMod2->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()),
00508 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcBucMod2->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()) ,
00509 400, -50, 50,
00510 400, -50, 50,
00511 "dX [cm]", "dY [cm]" ) ;
00512 fMatchingTvsDistMod24Mul1 =
00513 MakeTH2('D', Form("Matching/BucMod/fMatchingTvsDist_%s_%s_Mul1", fParRpcBucMod2->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()),
00514 Form("%s vs %s Clusters: Time difference vs Cluster distance, events with 1 cluster in each RPC", fParRpcBucMod2->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()) ,
00515 2000, -10000, 10000,
00516 100, -5, 5,
00517 Form("T_%s - T_%s [ps]", fParRpcBucMod2->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()),
00518 "Sqrt((X-X)^2+(Y-Y)^2) [cm]") ;
00519 }
00520 }
00521 if( 0 != fParRpcBucMod3)
00522 {
00523 fFluxBucMod3Evolution = new TProfile( "fFluxBucMod3Evolution",
00524 "Evolution of flux on RPC counter 3 in new module; Time [s]; Rate [Hz/cm^2]",
00525 36000, 0, 3600);
00526 AddHistogram( fFluxBucMod3Evolution, "Matching/BucMod/" );
00527
00528 if( 0 != fParRpcBucMod4)
00529 {
00530 fMatchingMod34Mul1 =
00531 MakeTH2('D', Form("Matching/BucMod/fMatching_%s_%s_Mul1", fParRpcBucMod3->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()),
00532 Form("%s vs %s Clusters: dX / dY, events with 1 cluster in each RPC", fParRpcBucMod3->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()) ,
00533 400, -50, 50,
00534 400, -50, 50,
00535 "dX [cm]", "dY [cm]" ) ;
00536 fMatchingTvsDistMod34Mul1 =
00537 MakeTH2('D', Form("Matching/BucMod/fMatchingTvsDist_%s_%s_Mul1", fParRpcBucMod3->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()),
00538 Form("%s vs %s Clusters: Time difference vs Cluster distance, events with 1 cluster in each RPC", fParRpcBucMod3->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()) ,
00539 2000, -10000, 10000,
00540 100, -5, 5,
00541 Form("T_%s - T_%s [ps]", fParRpcBucMod3->sStripRpcName.Data(), fParRpcBucMod4->sStripRpcName.Data()),
00542 "Sqrt((X-X)^2+(Y-Y)^2) [cm]") ;
00543 }
00544 }
00545 if( 0 != fParRpcBucMod4)
00546 {
00547 fFluxBucMod4Evolution = new TProfile( "fFluxBucMod4Evolution",
00548 "Evolution of flux on RPC counter 4 in new module; Time [s]; Rate [Hz/cm^2]",
00549 36000, 0, 3600);
00550 AddHistogram( fFluxBucMod4Evolution, "Matching/BucMod/" );
00551 }
00552
00553
00554 fBucM1HdR1R2 =
00555 MakeTH2('D', Form("Matching/fBucM1HdR1R2_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00556 Form("%s vs %s Clusters: events with 1 cluster in Buc, 2 in Hd, R(Buc-HD) for each", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00557 200, 0, 50,
00558 200, 0, 50,
00559 "R1 [cm]", "R2 [cm]" ) ;
00560 fHdMatchingNbBucIndex =
00561 MakeTH2('D', Form("Matching/fHdMatchingNbBucIndex_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00562 Form("%s vs %s Clusters:Nb of position matching Hd cluster for each Buc cluster", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00563 fParRpcBuc->uNbStrips/2, -0.5, fParRpcBuc->uNbStrips/2 -0.5,
00564 fParRpcHd->uNbStrips/2, -0.5, fParRpcHd->uNbStrips/2 -0.5,
00565 "Cluster Index Buc []", "nb Matching clusters HD []" ) ;
00566 fBestMatchingAllMul =
00567 MakeTH2('D', Form("Matching/fBestMatchingAllMul_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00568 Form("%s vs %s Clusters: dX / dY, best cluster match", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00569 400, -100, 100,
00570 400, -100, 100,
00571 "dX [cm]", "dY [cm]" ) ;
00572 fBestDistanceBucIndex =
00573 MakeTH2('D', Form("Matching/fBestDistanceBucIndex_%s_%s", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()),
00574 Form("%s vs %s Clusters: best R(Buc-HD) for each Buc cluster", fParRpcHd->sStripRpcName.Data(), fParRpcBuc->sStripRpcName.Data()) ,
00575 fParRpcBuc->uNbStrips/2, -0.5, fParRpcBuc->uNbStrips/2 -0.5,
00576 200, 0, 50,
00577 "Cluster Index Buc []", "R [cm]" ) ;
00578
00579 fHdEffVsPlastics =
00580 MakeTH1('D', "Matching/Efficiency/fHdEffVsPlastics",
00581 "Efficiency of Hd RPC vs Plastic 1" ,
00582 3, 0, 3,
00583 "Plastic Combination []", "Efficiency [%]" ) ;
00584 fHdEffVsPlastics->GetXaxis()->SetBinLabel(1 , "Plas 1");
00585 fHdEffVsPlastics->GetXaxis()->SetBinLabel(2 , "Plas 2");
00586 fHdEffVsPlastics->GetXaxis()->SetBinLabel(3 , "Plas 1+2");
00587
00588 fiNbEventsWithPlastics1 = 0;
00589 fiNbEventsWithPlastics1Hd = 0;
00590 fiNbEventsWithPlastics2 = 0;
00591 fiNbEventsWithPlastics2Hd = 0;
00592 fiNbEventsWithPlastics12 = 0;
00593 fiNbEventsWithPlastics12Hd = 0;
00594 fHdEffPlastics = new TLatex(0.5,0.5,"-- demo text --");
00595 fHdEffPlastics->SetName("PlasticsEffHd");
00596 fHdEffPlastics->SetNDC();
00597 AddObject(fHdEffPlastics);
00598
00599
00600 fSingleEvtClusterPosDisplayHd =
00601 MakeTH2('D', Form("Matching/fSingleEvtClusterPosDisplay_%s", fParRpcHd->sStripRpcName.Data()),
00602 Form("%s Clusters: Single event display", fParRpcHd->sStripRpcName.Data()) ,
00603 400, -50, 50,
00604 400, -50, 50,
00605 "X [cm]", "Y [cm]" ) ;
00606 fSingleEvtClusterPosDisplayHd->SetMarkerSize(1);
00607 fSingleEvtClusterPosDisplayHd->SetMarkerColor(4);
00608 fSingleEvtClusterPosDisplayHd->SetMarkerStyle(8);
00609 fSingleEvtClusterPosDisplayBuc =
00610 MakeTH2('D', Form("Matching/fSingleEvtClusterPosDisplay_%s", fParRpcBuc->sStripRpcName.Data()),
00611 Form("%s Clusters: Single event display", fParRpcBuc->sStripRpcName.Data()) ,
00612 400, -50, 50,
00613 400, -50, 50,
00614 "X [cm]", "Y [cm]" ) ;
00615 fSingleEvtClusterPosDisplayBuc->SetMarkerSize(1);
00616 fSingleEvtClusterPosDisplayHd->SetMarkerColor(2);
00617 fSingleEvtClusterPosDisplayBuc->SetMarkerStyle(34);
00618
00619
00620 }
00621
00622
00623 TMatchingProc::~TMatchingProc()
00624 {
00625
00626 if( 0 < fParRpcHd->uNbStrips )
00627 {
00628
00629 TString sStripNumbHd;
00630 TString sStripCharHd;
00631 TString sNewOffsetHd;
00632 TString sOldOffsetHd;
00633 TString sWidthHd;
00634
00635 sStripNumbHd += Form("%-16s","Strip No.: ");
00636 sStripCharHd += Form("%-16s"," ");
00637 sOldOffsetHd += Form("%-16s","monitor_opt ");
00638 sNewOffsetHd += Form("%-16s","strmatchingoffs ");
00639 sWidthHd += Form("%-16s","width ");
00640
00641 TGo4Log::Info("**** Matching Offset Map [ns] %-20s *******", fParRpcHd->sStripRpcName.Data());
00642 if( fTMatchingMul1StripHd->GetEntries() > 0 )
00643 {
00644 Double_t dMeanFit;
00645 Double_t dSigmaFit;
00646 for( UInt_t uBin = 0; uBin < fParRpcHd->uNbStrips; uBin++)
00647 {
00648 Double_t dOffsetList = fParRpcHd->dOffsetMatching[uBin];
00649 Double_t dNewOffset = dOffsetList;
00650 sStripNumbHd += Form("%9u",uBin);
00651 sStripCharHd += Form("%9c",'|');
00652 sOldOffsetHd += Form("%+9.0f",dOffsetList);
00653
00654 TH1D* th1dStripProfile = ((TH1D*)fTMatchingMul1StripHd-> ProjectionX( Form("px%smatching%d", fParRpcHd->sStripRpcName.Data(), uBin), uBin+1, uBin+1));
00655 if( 0 < th1dStripProfile->GetEntries() )
00656 {
00657 if( 0 != th1dStripProfile->GetRMS() )
00658 {
00659
00660
00661
00662
00663 TF1 *f1Gauss = new TF1(Form("GaussHd%d", uBin), "gaus",
00664 th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) - 3*th1dStripProfile->GetRMS(),
00665 th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) - 3*th1dStripProfile->GetRMS() );
00666
00667 f1Gauss->SetParameter(0, th1dStripProfile->GetMaximum() );
00668 f1Gauss->SetParameter(1, th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) );
00669 f1Gauss->SetParLimits(1, th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) - 1000,
00670 th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) + 1000);
00671 f1Gauss->SetParameter(2, th1dStripProfile->GetRMS());
00672 f1Gauss->SetParLimits(2, 0.0, th1dStripProfile->GetRMS());
00673
00674 TFitResultPtr r = th1dStripProfile->Fit(Form("GaussHd%d", uBin),"BRSQ");
00675 dMeanFit = r->Parameter(1);
00676 dSigmaFit = r->Parameter(2);
00677 delete f1Gauss;
00678 }
00679 else
00680 {
00681 dMeanFit = 0;
00682 dSigmaFit = 0;
00683 }
00684 dNewOffset += dMeanFit;
00685 sNewOffsetHd += Form("%+9.0f", dNewOffset);
00686 sWidthHd += Form("%+9.0f", dSigmaFit);
00687 }
00688 else
00689 {
00690 cout<<"Strip "<<uBin<<" empty."<<endl;
00691 sNewOffsetHd += Form("%+9.0f", dOffsetList);
00692 sWidthHd += Form("%+9.0f", 0.0);
00693 }
00694 delete th1dStripProfile;
00695 }
00696 }
00697 cout<<sStripNumbHd<<endl;
00698 cout<<sStripCharHd<<endl;
00699 cout<<sOldOffsetHd<<endl;
00700 cout<<sNewOffsetHd<<endl;
00701 cout<<sWidthHd<<endl;
00702 TGo4Log::Info("********************************************************");
00703
00704
00705 TString sStripNumbBuc;
00706 TString sStripCharBuc;
00707 TString sFitStartBuc0;
00708 TString sFitStartBuc1;
00709 TString sFitStartBuc2;
00710 TString sOldOffsetBuc;
00711 TString sNewOffsetBuc;
00712 TString sWidthBuc;
00713
00714 sStripNumbBuc += Form("%-16s","Strip No.: ");
00715 sStripCharBuc += Form("%-16s"," ");
00716 sFitStartBuc0 += Form("%-16s","Fit val init 0 ");
00717 sFitStartBuc1 += Form("%-16s","Fit val init 1 ");
00718 sFitStartBuc2 += Form("%-16s","Fit val init 2 ");
00719 sOldOffsetBuc += Form("%-16s","monitor_opt ");
00720 sNewOffsetBuc += Form("%-16s","strmatchingoffs ");
00721 sWidthBuc += Form("%-16s","width ");
00722
00723 TGo4Log::Info("**** Matching Offset Map [ns] %-20s *******", fParRpcBuc->sStripRpcName.Data());
00724 if( fTMatchingMul1StripBuc->GetEntries() > 0 )
00725 {
00726 Double_t dMeanFit;
00727 Double_t dSigmaFit;
00728 for( UInt_t uBin = 0; uBin < fParRpcBuc->uNbStrips; uBin++)
00729 {
00730 Double_t dOffsetList = fParRpcBuc->dOffsetMatching[uBin];
00731 Double_t dNewOffset = dOffsetList;
00732 sStripNumbBuc += Form("%9u",uBin);
00733 sStripCharBuc += Form("%9c",'|');
00734 sOldOffsetBuc += Form("%+9.0f",dOffsetList);
00735
00736 TH1D* th1dStripProfile = ((TH1D*)fTMatchingMul1StripBuc-> ProjectionX( Form("px%smatching%d", fParRpcBuc->sStripRpcName.Data(), uBin), uBin+1, uBin+1));
00737 if( 0 < th1dStripProfile->GetEntries() )
00738 {
00739 if( 0 != th1dStripProfile->GetRMS() )
00740 {
00741
00742
00743
00744
00745 TF1 *f1Gauss = new TF1(Form("GaussBuc%d", uBin), "gaus",
00746 th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) - 3*th1dStripProfile->GetRMS(),
00747 th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) - 3*th1dStripProfile->GetRMS() );
00748
00749 sFitStartBuc0 += Form("%+9.0f",th1dStripProfile->GetMaximum() );
00750 sFitStartBuc1 += Form("%+9.0f",th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) );
00751 sFitStartBuc2 += Form("%+9.0f",th1dStripProfile->GetRMS() );
00752
00753 f1Gauss->SetParameter(0, th1dStripProfile->GetMaximum() );
00754 f1Gauss->SetParameter(1, th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) );
00755 f1Gauss->SetParLimits(1, th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) - 1000,
00756 th1dStripProfile->GetBinCenter(th1dStripProfile->GetMaximumBin()) + 1000);
00757 f1Gauss->SetParameter(2, th1dStripProfile->GetRMS());
00758 f1Gauss->SetParLimits(2, 0.0, th1dStripProfile->GetRMS());
00759
00760 TFitResultPtr r = th1dStripProfile->Fit(Form("GaussBuc%d", uBin),"BRSQ");
00761 dMeanFit = r->Parameter(1);
00762 dSigmaFit = r->Parameter(2);
00763 cout<<r->Parameter(0)<<" "<<r->Parameter(1)<<" "<<r->Parameter(2)<<endl;
00764 delete f1Gauss;
00765 }
00766 else
00767 {
00768 sFitStartBuc0 += Form("%+9.0f",0.0 );
00769 sFitStartBuc1 += Form("%+9.0f",0.0 );
00770 sFitStartBuc2 += Form("%+9.0f",0.0 );
00771 dMeanFit = 0;
00772 dSigmaFit = 0;
00773 }
00774 dNewOffset += dMeanFit;
00775 sNewOffsetBuc += Form("%+9.0f", dNewOffset);
00776 sWidthBuc += Form("%+9.0f", dSigmaFit);
00777 }
00778 else
00779 {
00780 cout<<"Strip "<<uBin<<" empty."<<endl;
00781 sNewOffsetBuc += Form("%+9.0f", dOffsetList);
00782 sWidthBuc += Form("%+9.0f", 0.0);
00783 sFitStartBuc0 += Form("%+9.0f", 0.0 );
00784 sFitStartBuc1 += Form("%+9.0f", 0.0 );
00785 sFitStartBuc2 += Form("%+9.0f", 0.0 );
00786 }
00787 delete th1dStripProfile;
00788 }
00789 }
00790 cout<<sStripNumbBuc<<endl;
00791 cout<<sStripCharBuc<<endl;
00792 cout<<sFitStartBuc0<<endl;
00793 cout<<sFitStartBuc1<<endl;
00794 cout<<sFitStartBuc2<<endl;
00795 cout<<sOldOffsetBuc<<endl;
00796 cout<<sNewOffsetBuc<<endl;
00797 cout<<sWidthBuc<<endl;
00798 TGo4Log::Info("********************************************************");
00799 }
00800
00801 cout << "**** TMatchingProc: Delete instance " << endl;
00802
00803 }
00804
00805 void TMatchingProc::InitEvent(TGo4EventElement* outevnt)
00806 {
00807
00808
00809
00810
00811 if(fCrateInputEvent==0)
00812 {
00813 TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Calibration"));
00814 if(btevent)
00815 {
00816 fCrateInputEvent=dynamic_cast<TMbsCrateEvent*>(btevent->GetSubEvent("MBSCRATE"));
00817 }
00818 else
00819 {
00820 fCrateInputEvent=dynamic_cast<TMbsCrateEvent*>(GetInputEvent());
00821 }
00822 if(fCrateInputEvent==0) {
00823 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: no input event TMbsCrateEvent!!! STOP GO4");
00824 }
00825 }
00826 if(fTriglogInputEvent==0)
00827 {
00828 TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Calibration"));
00829 if(btevent)
00830 {
00831 fTriglogInputEvent=dynamic_cast<TTriglogEvent*>(btevent->GetSubEvent("TRIGLOG"));
00832 }
00833
00834 if(fTriglogInputEvent==0) {
00835 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TTriglogEvent!!! STOP GO4");
00836 }
00837 }
00838 if(fVftxInputEvent==0)
00839 {
00840 TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Detector"));
00841 if(btevent)
00842 {
00843 fVftxInputEvent=dynamic_cast<TVftxEvent*>(btevent->GetSubEvent("VFTX"));
00844 }
00845
00846 if(fVftxInputEvent==0) {
00847 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TVftxEvent!!! STOP GO4");
00848 }
00849 }
00850 if(fRpcHdInputEvent==0 || fRpcBucInputEvent==0 || fScalersInputEvent==0 )
00851 {
00852 TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Tracking"));
00853 if(btevent)
00854 {
00855 fRpcHdInputEvent =dynamic_cast<TRpcEvent*>(btevent->GetSubEvent("RPC_HD"));
00856 fRpcBucInputEvent =dynamic_cast<TRpcEvent*>(btevent->GetSubEvent("RPC_BUC_REF"));
00857 if( 0 != fParRpcBucMod1)
00858 fRpcBucMod1InputEvent =dynamic_cast<TRpcEvent*>(btevent->GetSubEvent("RPC_BUC_MOD1"));
00859 if( 0 != fParRpcBucMod2)
00860 fRpcBucMod2InputEvent =dynamic_cast<TRpcEvent*>(btevent->GetSubEvent("RPC_BUC_MOD2"));
00861 if( 0 != fParRpcBucMod3)
00862 fRpcBucMod3InputEvent =dynamic_cast<TRpcEvent*>(btevent->GetSubEvent("RPC_BUC_MOD3"));
00863 if( 0 != fParRpcBucMod4)
00864 fRpcBucMod4InputEvent =dynamic_cast<TRpcEvent*>(btevent->GetSubEvent("RPC_BUC_MOD4"));
00865 fScalersInputEvent=dynamic_cast<TScalersEvent*>(btevent->GetSubEvent("SCALERS"));
00866 }
00867
00868 if(fRpcHdInputEvent==0) {
00869 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TRpcEvent for HD!!! STOP GO4");
00870 }
00871 if(fRpcBucInputEvent==0) {
00872 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TRpcEvent for Buc Ref!!! STOP GO4");
00873 }
00874 if( 0 != fParRpcBucMod1 && fRpcBucMod1InputEvent==0) {
00875 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TRpcEvent for Buc Mod 1!!! STOP GO4");
00876 }
00877 if( 0 != fParRpcBucMod2 && fRpcBucMod2InputEvent==0) {
00878 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TRpcEvent for Buc Mod 2!!! STOP GO4");
00879 }
00880 if( 0 != fParRpcBucMod3 && fRpcBucMod3InputEvent==0) {
00881 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TRpcEvent for Buc Mod 3!!! STOP GO4");
00882 }
00883 if( 0 != fParRpcBucMod4 && fRpcBucMod4InputEvent==0) {
00884 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TRpcEvent for Buc Mod 4!!! STOP GO4");
00885 }
00886 if(fScalersInputEvent==0) {
00887 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a TScalersEvent!!! STOP GO4");
00888 }
00889 }
00890 if( 0 == fPlasticsEvent )
00891 {
00892 TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent("Tracking"));
00893 if(btevent)
00894 {
00895 fPlasticsEvent=dynamic_cast<TPlasticsEvent*>(btevent->GetSubEvent("PLASTICS"));
00896 }
00897
00898 if(fPlasticsEvent==0) {
00899 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: input event is/has not a fPlasticsEvent!!! STOP GO4");
00900 }
00901 }
00902
00903
00904
00905
00906 if(fOutputEvent==0)
00907 {
00908 TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(outevnt);
00909 if(btevent)
00910 {
00911 fOutputEvent=dynamic_cast<TMatchingEvent*>(btevent->GetSubEvent("MATCHING"));
00912 }
00913 else
00914 {
00915
00916 fOutputEvent= dynamic_cast<TMatchingEvent*>(outevnt);
00917 }
00918 if(fOutputEvent==0) {
00919 GO4_STOP_ANALYSIS_MESSAGE("**** TMatchingProc: Fatal error: output event is not a TMatchingEvent!!! STOP GO4");
00920 }
00921 else {
00922
00923 }
00924 }
00925 }
00926
00927 void TMatchingProc::FinalizeEvent()
00928 {
00929
00930
00931
00932
00933 return;
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966 {
00967 Bool_t bSelectedTrigger = kFALSE;
00968 if( -1 == fPar->iTriggerSelection )
00969 bSelectedTrigger = kTRUE;
00970 else if( 1 == ((fTriglogInputEvent->fVulomTriggerPattern>>(fPar->iTriggerSelection)) & 0x1) )
00971 bSelectedTrigger = kTRUE;
00972
00973
00974 Double_t dBucarestReferenceTotalRate =
00975 ( 0.0
00976 + fScalersInputEvent->fDDetectorRate[2] )
00977 /( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips);
00978
00979 if( kTRUE == bSelectedTrigger )
00980 {
00981 fMatchingMulHdMulBuc->Fill(((fRpcHdInputEvent->fEvents[0]).fClusters).size(),
00982 ((fRpcBucInputEvent->fEvents[0]).fClusters).size());
00983
00984 if( 5.0 <= dBucarestReferenceTotalRate )
00985 {
00986 Bool_t bBigBucThere = kFALSE;
00987 for(UInt_t uClusterBuc = 0; uClusterBuc < ((fRpcBucInputEvent->fEvents[0]).fClusters).size(); uClusterBuc++)
00988 if( 1 < ( ( ((fRpcBucInputEvent->fEvents[0]).fClusters)[uClusterBuc] ).fHits ).size() &&
00989 -4.5 < ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY &&
00990 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY < 4.5)
00991 bBigBucThere = kTRUE;
00992 if( kTRUE == bBigBucThere )
00993 fMatchingMulHdMulBucBigSizeBuc->Fill(((fRpcHdInputEvent->fEvents[0]).fClusters).size(),
00994 ((fRpcBucInputEvent->fEvents[0]).fClusters).size());
00995 }
00996 }
00997
00998
00999 if( 1 == ((fRpcHdInputEvent->fEvents[0]).fClusters).size() &&
01000 1 == ((fRpcBucInputEvent->fEvents[0]).fClusters).size())
01001 {
01002 if( kTRUE == bSelectedTrigger )
01003 {
01004
01005 fXMatchingMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX,
01006 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX);
01007 fYMatchingMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY,
01008 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY);
01009 fMatchingMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01010 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01011 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01012 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) );
01013
01014 fXMatchingMul1StripHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01015 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01016 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01017 fYMatchingMul1StripHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01018 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01019 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01020 fMatchingMul1StripHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01021 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01022 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01023 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01024 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01025
01026 fXMatchingMul1DtHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01027 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01028 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX);
01029 fYMatchingMul1DtHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01030 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01031 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX);
01032
01033 fXMatchingMul1StripBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01034 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01035 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01036 fYMatchingMul1StripBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01037 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01038 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01039 fMatchingMul1StripBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01040 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01041 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01042 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01043 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01044
01045 fXMatchingMul1DtBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01046 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01047 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY);
01048 fYMatchingMul1DtBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01049 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01050 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY);
01051
01052
01053 switch( fPar->uDetectorOffsetToUse )
01054 {
01055 case 0:
01056 fDtMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime
01057 - fParRpcHd->dOffsetMatching[ (Int_t)(((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ] );
01058 break;
01059 case 1:
01060 fDtMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime
01061 - fParRpcBuc->dOffsetMatching[ (Int_t)(((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ] );
01062 break;
01063 case 2:
01064 fDtMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime
01065 - fParRpcHd->dOffsetMatching[ (Int_t)(((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ]
01066 - fParRpcBuc->dOffsetMatching[ (Int_t)(((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ] );
01067 break;
01068 default:
01069 fDtMul1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime );
01070 break;
01071 }
01072
01073 fTMatchingMul1StripHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime
01074 - fParRpcHd->dOffsetMatching[ (Int_t)(((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ]
01075 - fParRpcBuc->dOffsetMatching[ (Int_t)(((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ] ,
01076 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01077 fTMatchingMul1DtHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01078 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX);
01079 fTMatchingMul1StripBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime
01080 - fParRpcHd->dOffsetMatching[ (Int_t)(((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ]
01081 - fParRpcBuc->dOffsetMatching[ (Int_t)(((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip) ] ,
01082 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip);
01083 fTMatchingMul1DtBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01084 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY);
01085
01086 fMatchingDtMul1->Fill(((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01087 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01088 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01089 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY),
01090 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime);
01091
01092 if( 1 == (((fRpcHdInputEvent->fEvents[0]).fClusters[0]).fHits).size() )
01093 {
01094 fTMatchingMul1StripTotLeftHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01095 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip,
01096 (((fRpcHdInputEvent->fEvents[0]).fClusters[0]).fHits[0]).dTotLeft );
01097 fTMatchingMul1StripTotRightHd->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01098 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanStrip,
01099 (((fRpcHdInputEvent->fEvents[0]).fClusters[0]).fHits[0]).dTotRight );
01100 }
01101 if( 1 == (((fRpcBucInputEvent->fEvents[0]).fClusters[0]).fHits).size() )
01102 {
01103 fTMatchingMul1StripTotLeftBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01104 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip,
01105 (((fRpcBucInputEvent->fEvents[0]).fClusters[0]).fHits[0]).dTotLeft );
01106 fTMatchingMul1StripTotRightBuc->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01107 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dMeanStrip,
01108 (((fRpcBucInputEvent->fEvents[0]).fClusters[0]).fHits[0]).dTotRight );
01109 }
01110
01111 }
01112
01113 if( 1 == fPar->uTriggerSelDebugHistos)
01114 for(Int_t iTrigger = 0; iTrigger<16; iTrigger++)
01115 if( 1 == ((fTriglogInputEvent->fVulomTriggerPattern>>iTrigger) & 0x1) )
01116 fMatchingMul1TriggerDebug[iTrigger]->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01117 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01118 ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01119 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) );
01120 }
01121
01122
01123 fBucMulVsRate->Fill( fScalersInputEvent->fDTriglogRate[0][13]/(( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips)),
01124 ((fRpcBucInputEvent->fEvents[0]).fClusters).size());
01125 fHdMulVsRate->Fill(fScalersInputEvent->fDTriglogRate[0][13]/(( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips)),
01126 ((fRpcHdInputEvent->fEvents[0]).fClusters).size());
01127
01128 if( 5.0 <= dBucarestReferenceTotalRate
01129 && 0<((fRpcBucInputEvent->fEvents[0]).fClusters).size()
01130 && 0<((fRpcHdInputEvent->fEvents[0]).fClusters).size() )
01131 {
01132 fSingleEvtClusterPosDisplayHd->Reset();
01133 fSingleEvtClusterPosDisplayBuc->Reset();
01134 for(UInt_t uClusterHd = 0; uClusterHd < ((fRpcHdInputEvent->fEvents[0]).fClusters).size(); uClusterHd++)
01135 fSingleEvtClusterPosDisplayHd->Fill(
01136 ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX,
01137 ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY );
01138
01139 Int_t iNbPositionMatchingHdClusters = 0;
01140 for(UInt_t uClusterBuc = 0; uClusterBuc < ((fRpcBucInputEvent->fEvents[0]).fClusters).size(); uClusterBuc++)
01141 {
01142 UInt_t uBestHdCluster = ((fRpcHdInputEvent->fEvents[0]).fClusters).size();
01143 Double_t dBestDistance = -1;
01144
01145 for(UInt_t uClusterHd = 0; uClusterHd < ((fRpcHdInputEvent->fEvents[0]).fClusters).size(); uClusterHd++)
01146 {
01147 Double_t dDR = TMath::Sqrt(
01148 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01149 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dX + fParRpcBuc->dStripRpcPosX) )*
01150 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01151 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dX + fParRpcBuc->dStripRpcPosX) ) +
01152 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01153 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dY + fParRpcBuc->dStripRpcPosY) )*
01154 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01155 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dY + fParRpcBuc->dStripRpcPosY) ) );
01156 if( dDR <= 3.0 )
01157 iNbPositionMatchingHdClusters++;
01158 if( dDR < dBestDistance || dBestDistance < 0 )
01159 {
01160 uBestHdCluster = uClusterHd;
01161 dBestDistance = dDR;
01162 }
01163
01164 }
01165 if( uBestHdCluster < ((fRpcHdInputEvent->fEvents[0]).fClusters).size() && 0 < dBestDistance )
01166 {
01167 fBestMatchingAllMul->Fill(
01168 ((fRpcHdInputEvent->fEvents[0]).fClusters[uBestHdCluster]).dX + fParRpcHd->dStripRpcPosX
01169 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dX + fParRpcBuc->dStripRpcPosX),
01170 ((fRpcHdInputEvent->fEvents[0]).fClusters[uBestHdCluster]).dY + fParRpcHd->dStripRpcPosY
01171 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dY + fParRpcBuc->dStripRpcPosY));
01172 fBestDistanceBucIndex->Fill( uClusterBuc, dBestDistance);
01173 }
01174
01175 fSingleEvtClusterPosDisplayBuc->Fill(
01176 ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dX + fParRpcBuc->dStripRpcPosX,
01177 ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dY + fParRpcBuc->dStripRpcPosY );
01178 }
01179 fHdMatchingNbBucIndex->Fill(((fRpcBucInputEvent->fEvents[0]).fClusters).size(), iNbPositionMatchingHdClusters );
01180 }
01181
01182
01183
01184 if(
01185 5.0 <= dBucarestReferenceTotalRate )
01186 {
01187 fuNbEventsSummed ++;
01188 fdBucRatesSummed += dBucarestReferenceTotalRate;
01189 }
01190 if( 1 == ((fRpcBucInputEvent->fEvents[0]).fClusters).size() )
01191 {
01192 Bool_t bAtLeastOneMatchingHdCluster = kFALSE;
01193
01194
01195 if( -4.5 < ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY &&
01196 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY < 4.5 &&
01197 5.0 <= dBucarestReferenceTotalRate)
01198 {
01199 fiNbEventsWith1BigBucCl[( ( ((fRpcBucInputEvent->fEvents[0]).fClusters)[0] ).fHits ).size()]++;
01200 if( 0 < ((fRpcHdInputEvent->fEvents[0]).fClusters).size())
01201 fiNbEventsWith1BigBucClHd[( ( ((fRpcBucInputEvent->fEvents[0]).fClusters)[0] ).fHits ).size()]++;
01202 }
01203
01204 if( 2 == ((fRpcHdInputEvent->fEvents[0]).fClusters).size())
01205 fBucM1HdR1R2->Fill(
01206 TMath::Sqrt(
01207 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01208 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX) )*
01209 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcHd->dStripRpcPosX
01210 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX) ) +
01211 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01212 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) )*
01213 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcHd->dStripRpcPosY
01214 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) ) ),
01215 TMath::Sqrt(
01216 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[1]).dX + fParRpcHd->dStripRpcPosX
01217 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX) )*
01218 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[1]).dX + fParRpcHd->dStripRpcPosX
01219 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX) ) +
01220 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[1]).dY + fParRpcHd->dStripRpcPosY
01221 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) )*
01222 ( ((fRpcHdInputEvent->fEvents[0]).fClusters[1]).dY + fParRpcHd->dStripRpcPosY
01223 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) ) ));
01224
01225
01226 for(UInt_t uClusterHd = 0; uClusterHd < ((fRpcHdInputEvent->fEvents[0]).fClusters).size(); uClusterHd++)
01227 {
01228 fMatchingMulBuc1->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01229 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX),
01230 ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01231 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) );
01232
01233 if( -10.0 < ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01234 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX) &&
01235 ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01236 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBuc->dStripRpcPosX) < 10.0 &&
01237 -10.0 < ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01238 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) &&
01239 ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01240 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBuc->dStripRpcPosY) < 10.0 )
01241 bAtLeastOneMatchingHdCluster = kTRUE;
01242 }
01243
01244 fBucMul1Rate->Fill( fScalersInputEvent->fDDetectorRate[2]
01245 );
01246
01247 if( kTRUE == bAtLeastOneMatchingHdCluster )
01248 {
01249
01250 if( -4.5 < ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY &&
01251 ((fRpcBucInputEvent->fEvents[0]).fClusters[0]).dY < 4.5 &&
01252 5.0 <= dBucarestReferenceTotalRate)
01253 fiNbEventsWith1BigBucClHdOk[( ( ((fRpcBucInputEvent->fEvents[0]).fClusters)[0] ).fHits ).size()]++;
01254
01255
01256
01257 if(1 < ( ( ((fRpcBucInputEvent->fEvents[0]).fClusters)[0] ).fHits ).size() &&
01258 5.0 <= dBucarestReferenceTotalRate )
01259 fuNbEventsWithBucMul1HdOk++;
01260 }
01261
01262
01263 if( 1 < ( ( ((fRpcBucInputEvent->fEvents[0]).fClusters)[0] ).fHits ).size() &&
01264 5.0 <= dBucarestReferenceTotalRate )
01265 {
01266 fuNbEventsWithBucMul1 ++;
01267 if( 0 < ((fRpcHdInputEvent->fEvents[0]).fClusters).size()
01268
01269 )
01270 fuNbEventsWithBucMul1Hd++;
01271 }
01272
01273
01274
01275 if( fPar->uNbEventAverageEfficiency <= fuNbEventsSummed )
01276
01277 {
01278 if( 0 < fuNbEventsWithBucMul1 )
01279 {
01280 fHdEffVsRateBucMul1->Fill( fdBucRatesSummed /(Double_t)(fuNbEventsSummed),
01281 100.0*(Double_t)fuNbEventsWithBucMul1Hd/(Double_t)fuNbEventsWithBucMul1,
01282 fuNbEventsWithBucMul1);
01283 fHdEffVsRateBucMul1Ok->Fill( fdBucRatesSummed /(Double_t)(fuNbEventsSummed),
01284 100.0*(Double_t)fuNbEventsWithBucMul1HdOk/(Double_t)fuNbEventsWithBucMul1,
01285 fuNbEventsWithBucMul1);
01286
01287 fHdEffVsTimeBucMul1->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01288 100.0*(Double_t)fuNbEventsWithBucMul1Hd/(Double_t)fuNbEventsWithBucMul1,
01289 fuNbEventsWithBucMul1);
01290 fHdEffVsTimeBucMul1Ok->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01291 100.0*(Double_t)fuNbEventsWithBucMul1HdOk/(Double_t)fuNbEventsWithBucMul1,
01292 fuNbEventsWithBucMul1);
01293 }
01294 fuNbEventsSummed = 0;
01295 fuNbEventsWithBucMul1 = 0;
01296 fuNbEventsWithBucMul1Hd = 0;
01297 fuNbEventsWithBucMul1HdOk = 0;
01298 fdBucRatesSummed = 0.0;
01299 }
01300 }
01301
01302 Double_t dTotalHdSizeOk = 0;
01303 Double_t dTotalHdOkSizeOk = 0;
01304 Double_t dTotalBucSizeOk = 0;
01305 for( UInt_t uClusterSize = 1; uClusterSize < fParRpcBuc->uNbStrips; uClusterSize++)
01306 if( 0 < fiNbEventsWith1BigBucCl[uClusterSize] )
01307 {
01308 if( 1 < uClusterSize)
01309 {
01310 dTotalHdSizeOk += fiNbEventsWith1BigBucClHd[uClusterSize];
01311 dTotalHdOkSizeOk += fiNbEventsWith1BigBucClHdOk[uClusterSize];
01312 dTotalBucSizeOk += fiNbEventsWith1BigBucCl[uClusterSize];
01313 }
01314 fHdEffVsBucSizeMul1->SetBinContent( fHdEffVsBucSizeMul1->FindBin(uClusterSize),
01315 100.0*(Double_t)fiNbEventsWith1BigBucClHd[uClusterSize]
01316 /(Double_t)fiNbEventsWith1BigBucCl[uClusterSize]);
01317
01318
01319
01320
01321
01322
01323 fHdEffVsBucSizeMul1Ok->SetBinContent( fHdEffVsBucSizeMul1Ok->FindBin(uClusterSize),
01324 100.0*(Double_t)fiNbEventsWith1BigBucClHdOk[uClusterSize]
01325 /(Double_t)fiNbEventsWith1BigBucCl[uClusterSize]);
01326
01327
01328
01329
01330
01331
01332 }
01333 if( 0 < dTotalBucSizeOk )
01334 {
01335 TString txt;
01336 txt.Form("#splitline{#scale[1.0]{#color[2]{Full efficiency:%f}}}{#scale[1.0]{#color[4]{Full efficiency OK:%f}}}",
01337 100.0*dTotalHdSizeOk/dTotalBucSizeOk,
01338 100.0*dTotalHdOkSizeOk/dTotalBucSizeOk);
01339 fHdEffBuMul1BucSize2->SetText(0.2, 0.5, txt.Data());
01340 }
01341
01342
01343 if( 2 == ((fRpcHdInputEvent->fEvents[0]).fClusters).size() &&
01344 2 == ((fRpcBucInputEvent->fEvents[0]).fClusters).size() )
01345 {
01346 for(UInt_t uClusterHd = 0; uClusterHd < ((fRpcHdInputEvent->fEvents[0]).fClusters).size(); uClusterHd++)
01347 {
01348 Double_t dX_Min = 0;
01349 Double_t dY_Min = 0;
01350 UInt_t uIndexClusterBuc = 0;
01351 for(UInt_t uClusterBuc = 0; uClusterBuc < ((fRpcBucInputEvent->fEvents[0]).fClusters).size(); uClusterBuc++)
01352 {
01353 if( ( dX_Min <= ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01354 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dX + fParRpcBuc->dStripRpcPosX) &&
01355 dY_Min <= ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01356 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dY + fParRpcBuc->dStripRpcPosY) ) ||
01357 ( 0 == dX_Min && 0 == dY_Min ) )
01358 {
01359 dX_Min = ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01360 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dX + fParRpcBuc->dStripRpcPosX);
01361 dY_Min = ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01362 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uClusterBuc]).dY + fParRpcBuc->dStripRpcPosY);
01363 uIndexClusterBuc = uClusterBuc;
01364 }
01365 }
01366 fXMatchingMul2->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX,
01367 ((fRpcBucInputEvent->fEvents[0]).fClusters[uIndexClusterBuc]).dX + fParRpcBuc->dStripRpcPosX);
01368 fYMatchingMul2->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY,
01369 ((fRpcBucInputEvent->fEvents[0]).fClusters[uIndexClusterBuc]).dY + fParRpcBuc->dStripRpcPosY);
01370 fMatchingMul2->Fill( ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dX + fParRpcHd->dStripRpcPosX
01371 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uIndexClusterBuc]).dX + fParRpcBuc->dStripRpcPosX),
01372 ((fRpcHdInputEvent->fEvents[0]).fClusters[uClusterHd]).dY + fParRpcHd->dStripRpcPosY
01373 -( ((fRpcBucInputEvent->fEvents[0]).fClusters[uIndexClusterBuc]).dY + fParRpcBuc->dStripRpcPosY) );
01374 }
01375 }
01376
01377 if( 0 < ( (fParRpcHd->dStripLength)*(fParRpcHd->dStripWidth)*(double_t)fParRpcHd->uNbStrips) )
01378 {
01379 if( 0.0 < fScalersInputEvent->fDDetectorRate[0])
01380 fFluxHdLeftEvolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01381 fScalersInputEvent->fDDetectorRate[0]
01382 /( (fParRpcHd->dStripLength)*(fParRpcHd->dStripWidth)*(double_t)fParRpcHd->uNbStrips),
01383 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01384
01385 if( 0.0 < fScalersInputEvent->fDDetectorRate[0])
01386 fFluxHdRightEvolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01387 fScalersInputEvent->fDDetectorRate[1]
01388 /( (fParRpcHd->dStripLength)*(fParRpcHd->dStripWidth)*(double_t)fParRpcHd->uNbStrips),
01389 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01390 }
01391 #if SCALORMU_NB_SCAL == 16
01392
01393 if( 0 < ( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips) &&
01394 0.0 < fScalersInputEvent->fDDetectorRate[2]
01395 )
01396 fFluxBucEvolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01397 fScalersInputEvent->fDDetectorRate[2]
01398 /( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips),
01399 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01400 #else
01401
01402 if( 0 < ( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips) &&
01403 0.0 < fScalersInputEvent->fDDetectorRate[2]
01404 )
01405 fFluxBucLeftEvolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01406 fScalersInputEvent->fDDetectorRate[2]
01407 /( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips),
01408 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01409 if( 0 < ( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips) &&
01410 0.0 < fScalersInputEvent->fDDetectorRate[3]
01411 )
01412 fFluxBucRightEvolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01413 fScalersInputEvent->fDDetectorRate[3]
01414 /( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips),
01415 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01416 #endif
01417
01418 if(0 < ( (fParRpcHd->dStripLength)*(fParRpcHd->dStripWidth)*(double_t)fParRpcHd->uNbStrips) &&
01419 0 < ( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips) )
01420 {
01421 if(( -1 <fScalersInputEvent->fDScalOrMuRate[0] ||
01422 -1 <fScalersInputEvent->fDScalOrMuRate[1] ||
01423 -1 <fScalersInputEvent->fDScalOrMuRate[2] ||
01424 -1 <fScalersInputEvent->fDScalOrMuRate[3] ) &&
01425 ( -1 <fScalersInputEvent->fDScalOrMuRate[8] ||
01426 -1 <fScalersInputEvent->fDScalOrMuRate[9] ||
01427 -1 <fScalersInputEvent->fDScalOrMuRate[10] ||
01428 -1 <fScalersInputEvent->fDScalOrMuRate[11] ||
01429 -1 <fScalersInputEvent->fDScalOrMuRate[12] ||
01430 -1 <fScalersInputEvent->fDScalOrMuRate[13] ||
01431 -1 <fScalersInputEvent->fDScalOrMuRate[14] ||
01432 -1 <fScalersInputEvent->fDScalOrMuRate[15] ))
01433 fFluxComparisonHdLeftBuc->Fill(
01434 ( (-1 <fScalersInputEvent->fDScalOrMuRate[8] ? fScalersInputEvent->fDScalOrMuRate[ 8] : 0.0)
01435 + (-1 <fScalersInputEvent->fDScalOrMuRate[9] ? fScalersInputEvent->fDScalOrMuRate[ 9] : 0.0)
01436 + (-1 <fScalersInputEvent->fDScalOrMuRate[10] ? fScalersInputEvent->fDScalOrMuRate[10] : 0.0)
01437 + (-1 <fScalersInputEvent->fDScalOrMuRate[11] ? fScalersInputEvent->fDScalOrMuRate[11] : 0.0)
01438 + (-1 <fScalersInputEvent->fDScalOrMuRate[12] ? fScalersInputEvent->fDScalOrMuRate[12] : 0.0)
01439 + (-1 <fScalersInputEvent->fDScalOrMuRate[13] ? fScalersInputEvent->fDScalOrMuRate[13] : 0.0)
01440 + (-1 <fScalersInputEvent->fDScalOrMuRate[14] ? fScalersInputEvent->fDScalOrMuRate[14] : 0.0)
01441 + (-1 <fScalersInputEvent->fDScalOrMuRate[15] ? fScalersInputEvent->fDScalOrMuRate[15] : 0.0) )
01442 /( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips),
01443 ( (-1 <fScalersInputEvent->fDScalOrMuRate[0] ? fScalersInputEvent->fDScalOrMuRate[0] : 0.0)
01444 + (-1 <fScalersInputEvent->fDScalOrMuRate[1] ? fScalersInputEvent->fDScalOrMuRate[1] : 0.0)
01445 + (-1 <fScalersInputEvent->fDScalOrMuRate[2] ? fScalersInputEvent->fDScalOrMuRate[2] : 0.0)
01446 + (-1 <fScalersInputEvent->fDScalOrMuRate[3] ? fScalersInputEvent->fDScalOrMuRate[3] : 0.0) )
01447 /( (fParRpcHd->dStripLength)*(fParRpcHd->dStripWidth)*(double_t)fParRpcHd->uNbStrips) );
01448
01449 if(( -1 <fScalersInputEvent->fDScalOrMuRate[4] ||
01450 -1 <fScalersInputEvent->fDScalOrMuRate[5] ||
01451 -1 <fScalersInputEvent->fDScalOrMuRate[6] ||
01452 -1 <fScalersInputEvent->fDScalOrMuRate[7] )&&
01453 ( -1 <fScalersInputEvent->fDScalOrMuRate[8] ||
01454 -1 <fScalersInputEvent->fDScalOrMuRate[9] ||
01455 -1 <fScalersInputEvent->fDScalOrMuRate[10] ||
01456 -1 <fScalersInputEvent->fDScalOrMuRate[11] ||
01457 -1 <fScalersInputEvent->fDScalOrMuRate[12] ||
01458 -1 <fScalersInputEvent->fDScalOrMuRate[13] ||
01459 -1 <fScalersInputEvent->fDScalOrMuRate[14] ||
01460 -1 <fScalersInputEvent->fDScalOrMuRate[15] ))
01461 fFluxComparisonHdRightBuc->Fill(
01462 ( (-1 <fScalersInputEvent->fDScalOrMuRate[8] ? fScalersInputEvent->fDScalOrMuRate[ 8] : 0.0)
01463 + (-1 <fScalersInputEvent->fDScalOrMuRate[9] ? fScalersInputEvent->fDScalOrMuRate[ 9] : 0.0)
01464 + (-1 <fScalersInputEvent->fDScalOrMuRate[10] ? fScalersInputEvent->fDScalOrMuRate[10] : 0.0)
01465 + (-1 <fScalersInputEvent->fDScalOrMuRate[11] ? fScalersInputEvent->fDScalOrMuRate[11] : 0.0)
01466 + (-1 <fScalersInputEvent->fDScalOrMuRate[12] ? fScalersInputEvent->fDScalOrMuRate[12] : 0.0)
01467 + (-1 <fScalersInputEvent->fDScalOrMuRate[13] ? fScalersInputEvent->fDScalOrMuRate[13] : 0.0)
01468 + (-1 <fScalersInputEvent->fDScalOrMuRate[14] ? fScalersInputEvent->fDScalOrMuRate[14] : 0.0)
01469 + (-1 <fScalersInputEvent->fDScalOrMuRate[15] ? fScalersInputEvent->fDScalOrMuRate[15] : 0.0) )
01470 /( (fParRpcBuc->dStripLength)*(fParRpcBuc->dStripWidth)*(double_t)fParRpcBuc->uNbStrips),
01471 ( (-1 <fScalersInputEvent->fDScalOrMuRate[4] ? fScalersInputEvent->fDScalOrMuRate[4] : 0.0)
01472 + (-1 <fScalersInputEvent->fDScalOrMuRate[5] ? fScalersInputEvent->fDScalOrMuRate[5] : 0.0)
01473 + (-1 <fScalersInputEvent->fDScalOrMuRate[6] ? fScalersInputEvent->fDScalOrMuRate[6] : 0.0)
01474 + (-1 <fScalersInputEvent->fDScalOrMuRate[7] ? fScalersInputEvent->fDScalOrMuRate[7] : 0.0) )
01475 /( (fParRpcHd->dStripLength)*(fParRpcHd->dStripWidth)*(double_t)fParRpcHd->uNbStrips) );
01476 }
01477
01478
01479 if( 0 != fParRpcBucMod1 && 0 != fParRpcBucMod3)
01480 if( 1 == ((fRpcBucMod1InputEvent->fEvents[0]).fClusters).size() &&
01481 1 == ((fRpcBucMod3InputEvent->fEvents[0]).fClusters).size())
01482 {
01483 fMatchingMod13Mul1->Fill( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod3->dStripRpcPosX
01484 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod1->dStripRpcPosX),
01485 ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod3->dStripRpcPosY
01486 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod1->dStripRpcPosY) );
01487 fMatchingTvsDistMod13Mul1->Fill(
01488 ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01489 TMath::Sqrt(
01490 ( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod3->dStripRpcPosX
01491 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod1->dStripRpcPosX) )*
01492 ( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod3->dStripRpcPosX
01493 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod1->dStripRpcPosX) ) +
01494 ( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod3->dStripRpcPosY
01495 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod1->dStripRpcPosY) )*
01496 ( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod3->dStripRpcPosY
01497 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod1->dStripRpcPosY) ) ) );
01498 }
01499 if( 0 != fParRpcBucMod1 && 0 != fParRpcBucMod2)
01500 if( 1 == ((fRpcBucMod1InputEvent->fEvents[0]).fClusters).size() &&
01501 1 == ((fRpcBucMod2InputEvent->fEvents[0]).fClusters).size())
01502 {
01503 fMatchingMod12Mul1->Fill( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod2->dStripRpcPosX
01504 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod1->dStripRpcPosX),
01505 ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod2->dStripRpcPosY
01506 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod1->dStripRpcPosY) );
01507 fMatchingTvsDistMod12Mul1->Fill(
01508 ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01509 TMath::Sqrt(
01510 ( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod2->dStripRpcPosX
01511 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod1->dStripRpcPosX) )*
01512 ( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod2->dStripRpcPosX
01513 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod1->dStripRpcPosX) ) +
01514 ( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod2->dStripRpcPosY
01515 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod1->dStripRpcPosY) )*
01516 ( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod2->dStripRpcPosY
01517 -( ((fRpcBucMod1InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod1->dStripRpcPosY) ) ) );
01518 }
01519 if( 0 != fParRpcBucMod2 && 0 != fParRpcBucMod4)
01520 if( 1 == ((fRpcBucMod2InputEvent->fEvents[0]).fClusters).size() &&
01521 1 == ((fRpcBucMod4InputEvent->fEvents[0]).fClusters).size())
01522 {
01523 fMatchingMod24Mul1->Fill( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod4->dStripRpcPosX
01524 -( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod2->dStripRpcPosX),
01525 ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod4->dStripRpcPosY
01526 -( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod2->dStripRpcPosY) );
01527 fMatchingTvsDistMod24Mul1->Fill(
01528 ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01529 TMath::Sqrt(
01530 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod4->dStripRpcPosX
01531 -( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod2->dStripRpcPosX) )*
01532 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod4->dStripRpcPosX
01533 -( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod2->dStripRpcPosX) ) +
01534 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod4->dStripRpcPosY
01535 -( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod2->dStripRpcPosY) )*
01536 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod4->dStripRpcPosY
01537 -( ((fRpcBucMod2InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod2->dStripRpcPosY) ) ) );
01538 }
01539 if( 0 != fParRpcBucMod3 && 0 != fParRpcBucMod4)
01540 if( 1 == ((fRpcBucMod3InputEvent->fEvents[0]).fClusters).size() &&
01541 1 == ((fRpcBucMod4InputEvent->fEvents[0]).fClusters).size())
01542 {
01543 fMatchingMod34Mul1->Fill( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod4->dStripRpcPosX
01544 -( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod3->dStripRpcPosX),
01545 ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod4->dStripRpcPosY
01546 -( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod3->dStripRpcPosY) );
01547 fMatchingTvsDistMod34Mul1->Fill(
01548 ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dMeanTime - ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dMeanTime,
01549 TMath::Sqrt(
01550 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod4->dStripRpcPosX
01551 -( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod3->dStripRpcPosX) )*
01552 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod4->dStripRpcPosX
01553 -( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dX + fParRpcBucMod3->dStripRpcPosX) ) +
01554 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod4->dStripRpcPosY
01555 -( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod3->dStripRpcPosY) )*
01556 ( ((fRpcBucMod4InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod4->dStripRpcPosY
01557 -( ((fRpcBucMod3InputEvent->fEvents[0]).fClusters[0]).dY + fParRpcBucMod3->dStripRpcPosY) ) ) );
01558 }
01559 if( 0 != fParRpcBucMod1)
01560 {
01561 if( 0 < ( (fParRpcBucMod1->dStripLength)*(fParRpcBucMod1->dStripWidth)*(double_t)fParRpcBucMod1->uNbStrips) )
01562 fFluxBucMod1Evolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01563 ( fScalersInputEvent->fDScalOrMuRate[0] +
01564 fScalersInputEvent->fDScalOrMuRate[1] )
01565 /( (fParRpcBucMod1->dStripLength)*(fParRpcBucMod1->dStripWidth)*(double_t)fParRpcBucMod1->uNbStrips),
01566 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01567 }
01568 if( 0 != fParRpcBucMod2)
01569 {
01570 if( 0 < ( (fParRpcBucMod2->dStripLength)*(fParRpcBucMod2->dStripWidth)*(double_t)fParRpcBucMod2->uNbStrips) )
01571 fFluxBucMod2Evolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01572 ( fScalersInputEvent->fDScalOrMuRate[2] +
01573 fScalersInputEvent->fDScalOrMuRate[3] )
01574 /( (fParRpcBucMod2->dStripLength)*(fParRpcBucMod2->dStripWidth)*(double_t)fParRpcBucMod2->uNbStrips),
01575 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01576 }
01577 if( 0 != fParRpcBucMod3)
01578 {
01579 if( 0 < ( (fParRpcBucMod3->dStripLength)*(fParRpcBucMod3->dStripWidth)*(double_t)fParRpcBucMod3->uNbStrips) )
01580 fFluxBucMod3Evolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01581 ( fScalersInputEvent->fDScalOrMuRate[4] +
01582 fScalersInputEvent->fDScalOrMuRate[5] )
01583 /( (fParRpcBucMod3->dStripLength)*(fParRpcBucMod3->dStripWidth)*(double_t)fParRpcBucMod3->uNbStrips),
01584 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01585 }
01586 if( 0 != fParRpcBucMod4)
01587 {
01588 if( 0 < ( (fParRpcBucMod4->dStripLength)*(fParRpcBucMod4->dStripWidth)*(double_t)fParRpcBucMod4->uNbStrips) )
01589 fFluxBucMod4Evolution->Fill( fScalersInputEvent->fDTimeSinceFirstEventSecondsTriglog,
01590 ( fScalersInputEvent->fDScalOrMuRate[6] +
01591 fScalersInputEvent->fDScalOrMuRate[7] )
01592 /( (fParRpcBucMod4->dStripLength)*(fParRpcBucMod4->dStripWidth)*(double_t)fParRpcBucMod4->uNbStrips),
01593 fScalersInputEvent->fDTimeSinceLastEventSecondsTriglog);
01594 }
01595
01596
01597
01598
01599
01600
01601
01602
01603
01604
01605
01606
01607
01608
01609
01610
01611
01612
01613
01614
01615
01616
01617
01618
01619
01620
01621
01622
01623
01624
01625
01626
01627
01628
01629
01630
01631
01632
01633
01634
01635
01636
01637
01638
01639 }
01640
01641
01642
01643
01644
01645
01646
01647
01648 fOutputEvent->SetValid(kTRUE);
01649 }