1 #include "baseTrackerAnalysis.hxx" 3 #include "BFieldDistortionSystematics.hxx" 4 #include "MomentumScaleSystematics.hxx" 5 #include "MomentumResolSystematics.hxx" 6 #include "MomRangeResolSystematics.hxx" 7 #include "TPCPIDSystematics.hxx" 8 #include "TPCClusterEffSystematics.hxx" 9 #include "FGDPIDSystematics.hxx" 11 #include "PileUpSystematics.hxx" 12 #include "FGDMassSystematics.hxx" 13 #include "OOFVSystematics.hxx" 14 #include "SandMuonsSystematics.hxx" 17 #include "ECalEMEnergyResolSystematics.hxx" 18 #include "ECalEMEnergyScaleSystematics.hxx" 21 #include "ToFResolSystematics.hxx" 24 #include "nueP0DPileUpSystematics.hxx" 25 #include "nueTPCPileUpSystematics.hxx" 26 #include "nueECalPileUpSystematics.hxx" 27 #include "nueOOFVSystematics.hxx" 30 #include "P0DVetoSystematics.hxx" 31 #include "P0DELossScaleSystematics.hxx" 32 #include "P0DELossResolSystematics.hxx" 35 #include "TPCdEdxDataCorrection.hxx" 36 #include "TPCdEdxMCCorrection.hxx" 37 #include "TPCExpecteddEdxCorrection.hxx" 38 #include "TPCPIDPullMCCorrection.hxx" 40 #include "PileUpCorrection.hxx" 41 #include "MomResolMCCorrection.hxx" 43 #include "FlipKinematicsCorrection.hxx" 44 #include "ToFCorrection.hxx" 45 #include "MomRangeCorrection.hxx" 47 #include "baseToyMaker.hxx" 59 _tpc_ecal_matcheff = NULL;
60 _tpc_p0d_matcheff = NULL;
61 _fgd_ecal_matcheff = NULL;
62 _fgd_ecal_smrd_matcheff = NULL;
63 _ecal_trackeff = NULL;
117 eweight().
AddEventWeight(SystId::kChargeIDEff,
"ChargeIDEff", _chargeid);
119 eweight().
AddEventWeight(SystId::kTpcTrackEff,
"TpcTrackEff", _tpctr);
120 eweight().
AddEventWeight(SystId::kTpcFgdMatchEff,
"TpcFgdMatchEff", _tpcfgdmatch);
121 eweight().
AddEventWeight(SystId::kFgdTrackEff,
"FgdTrackEff", _fgdtr);
122 eweight().
AddEventWeight(SystId::kFgdHybridTrackEff,
"FgdHybridTrackEff", _fgdhybtr);
123 eweight().
AddEventWeight(SystId::kMichelEleEff,
"MichelEleEff", _me);
130 eweight().
AddEventWeight(SystId::kTpcECalMatchEff,
"TpcECalMatchEff", _tpc_ecal_matcheff);
131 eweight().
AddEventWeight(SystId::kTpcP0dMatchEff,
"TpcP0dMatchEff", _tpc_p0d_matcheff);
132 eweight().
AddEventWeight(SystId::kFgdECalMatchEff,
"FgdECalMatchEff", _fgd_ecal_matcheff);
133 eweight().
AddEventWeight(SystId::kFgdECalSmrdMatchEff,
"FgdECalSMRDMatchEff", _fgd_ecal_smrd_matcheff);
134 eweight().
AddEventWeight(SystId::kECalTrackEff,
"ECalTrackEff", _ecal_trackeff);
136 eweight().
AddEventWeight(SystId::kECalEmHipPID,
"ECalEmHipPID", _ecal_emhippid);
137 eweight().
AddEventWeight(SystId::kFGD2Shower,
"Fgd2Shower", _fgd2shower);
146 baseAnalysis::DefineSystematics();
150 void baseTrackerAnalysis::DefineCorrections(){
153 baseAnalysis::DefineCorrections();
156 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Corrections.DisableAllCorrections")){
162 if ((
bool)ND::params().GetParameterI(
"baseTrackerAnalysis.Corrections.EnablePileUp")) corr().
AddCorrection(
"pileup_corr",
new PileUpCorrection());
164 if ((
bool)ND::params().GetParameterI(
"baseTrackerAnalysis.Corrections.EnableTPCdEdxMC")) corr().
AddCorrection(
"tpcdedx_mc_corr",
new TPCdEdxMCCorrection());
174 if ((
bool)ND::params().GetParameterI(
"baseTrackerAnalysis.Corrections.EnableFlipKinematicsCorrection"))
177 if ((
bool)ND::params().GetParameterI(
"baseTrackerAnalysis.Corrections.EnableToFCorrection"))
181 if ((
bool)ND::params().GetParameterI(
"baseTrackerAnalysis.Corrections.EnableMomRangeCorrection"))
193 baseAnalysis::DefineConfigurations();
197 if (_enableSingleVariationSystConf){
198 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableBFieldDist")){
199 AddConfiguration(conf(), bfield_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
202 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableMomScale")){
203 AddConfiguration(conf(), momscale_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
206 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableMomRes")){
207 AddConfiguration(conf(), momresol_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
210 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableMomRangeRes")){
211 AddConfiguration(conf(), momrange_resol_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
214 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableTPCPID")){
215 AddConfiguration(conf(), tpcpid_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
218 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableFGDPID")){
219 AddConfiguration(conf(), fgdpid_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
222 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableECalEMResol")){
223 AddConfiguration(conf(), ecal_emresol_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
226 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableECalEMScale")){
227 AddConfiguration(conf(), ecal_emscale_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
230 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableToFResol")){
231 AddConfiguration(conf(), tof_resol_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
234 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableP0DELossScale")){
235 AddConfiguration(conf(), p0d_elossscale_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
238 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableP0DELossResol")){
239 AddConfiguration(conf(), p0d_elossresol_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
244 if (_enableSingleWeightSystConf){
245 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableChargeConf")){
246 AddConfiguration(conf(), chargeideff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
249 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCTrackEff")){
250 AddConfiguration(conf(), tpctrackeff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
253 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDTrackEff")){
254 AddConfiguration(conf(), fgdtrackeff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
257 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDHybridTrackEff")){
258 AddConfiguration(conf(), fgdhybridtrackeff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
261 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCFGDMatchEff")){
262 AddConfiguration(conf(), tpcfgdmatcheff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
265 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableOOFV")){
266 AddConfiguration(conf(), oofv_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
269 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnablePileUp")){
270 AddConfiguration(conf(), pileup_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
273 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDMass")){
274 AddConfiguration(conf(), fgdmass_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
277 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableMichelEleEff")){
278 AddConfiguration(conf(), michel_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
281 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableSandMu")){
282 AddConfiguration(conf(), sandmu_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
285 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCClusterEff")){
286 AddConfiguration(conf(), tpcclustereff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
289 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCECalMatchEff")){
290 AddConfiguration(conf(), tpc_ecal_matcheff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
293 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCP0DMatchEff")){
294 AddConfiguration(conf(), tpc_p0d_matcheff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
297 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDECalMatchEff")){
298 AddConfiguration(conf(), fgd_ecal_matcheff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
301 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDECalSMRDMatchEff")){
302 AddConfiguration(conf(), fgd_ecal_smrd_matcheff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
303 conf().
EnableEventWeight(SystId::kFgdECalSmrdMatchEff, fgd_ecal_smrd_matcheff_syst);
305 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableECalTrackEff")){
306 AddConfiguration(conf(), ecal_trackeff_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
309 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableECalPID")){
310 AddConfiguration(conf(), ecal_pid_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
313 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableECalEmHipPID")){
314 AddConfiguration(conf(), ecal_emhippid_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
317 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGD2Shower")){
318 AddConfiguration(conf(), fgd2shower_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
321 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuETPCPileUp")){
322 AddConfiguration(conf(), nuetpcpileup_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
325 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuEP0DPileUp")){
326 AddConfiguration(conf(), nuep0dpileup_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
329 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuEECalPileUp")){
330 AddConfiguration(conf(), nueecalpileup_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
333 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuEOOFV")){
334 AddConfiguration(conf(), nueoofv_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
337 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableP0DVeto")){
338 AddConfiguration(conf(), p0d_veto_syst, _ntoys, _randomSeed,
new baseToyMaker(_randomSeed));
345 if ( _enableAllSystConfig){
346 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableBFieldDist")) conf().
EnableEventVariation(SystId::kBFieldDist , all_syst);
347 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableMomRes")) conf().
EnableEventVariation(SystId::kMomResol , all_syst);
348 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableMomRangeRes")) conf().
EnableEventVariation(SystId::kMomRangeResol , all_syst);
349 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableMomScale")) conf().
EnableEventVariation(SystId::kMomScale , all_syst);
350 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableTPCPID")) conf().
EnableEventVariation(SystId::kTpcPid , all_syst);
351 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableFGDPID")) conf().
EnableEventVariation(SystId::kFgdPid , all_syst);
352 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableECalEMResol")) conf().
EnableEventVariation(SystId::kECalEMResol , all_syst);
353 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableECalEMScale")) conf().
EnableEventVariation(SystId::kECalEMScale , all_syst);
354 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableToFResol")) conf().
EnableEventVariation(SystId::kToFResol , all_syst);
355 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableP0DELossScale")) conf().
EnableEventVariation(SystId::kP0DELossScale , all_syst);
356 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Variations.EnableP0DELossResol")) conf().
EnableEventVariation(SystId::kP0DELossResol , all_syst);
360 for (std::vector<ConfigurationBase* >::iterator it= conf().GetConfigurations().begin();it!=conf().
GetConfigurations().end();it++){
361 Int_t index = (*it)->GetIndex();
362 if (index != ConfigurationManager::default_conf && (index != all_syst || !_enableAllSystConfig))
continue;
364 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableChargeConf")) conf().
EnableEventWeight(SystId::kChargeIDEff , index);
365 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnablePileUp")) conf().
EnableEventWeight(SystId::kPileUp , index);
366 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableMichelEleEff")) conf().
EnableEventWeight(SystId::kMichelEleEff , index);
367 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCTrackEff")) conf().
EnableEventWeight(SystId::kTpcTrackEff , index);
368 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDTrackEff")) conf().
EnableEventWeight(SystId::kFgdTrackEff , index);
369 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDHybridTrackEff")) conf().
EnableEventWeight(SystId::kFgdHybridTrackEff , index);
370 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCFGDMatchEff")) conf().
EnableEventWeight(SystId::kTpcFgdMatchEff , index);
371 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableOOFV")) conf().
EnableEventWeight(SystId::kOOFV , index);
372 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCClusterEff")) conf().
EnableEventWeight(SystId::kTpcClusterEff , index);
373 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDMass")) conf().
EnableEventWeight(SystId::kFgdMass , index);
374 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableSandMu")) conf().
EnableEventWeight(SystId::kSandMu , index);
375 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCECalMatchEff")) conf().
EnableEventWeight(SystId::kTpcECalMatchEff , index);
376 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableTPCP0DMatchEff")) conf().
EnableEventWeight(SystId::kTpcP0dMatchEff , index);
377 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDECalMatchEff")) conf().
EnableEventWeight(SystId::kFgdECalMatchEff , index);
378 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGDECalSMRDMatchEff")) conf().
EnableEventWeight(SystId::kFgdECalSmrdMatchEff , index);
379 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableECalTrackEff")) conf().
EnableEventWeight(SystId::kECalTrackEff , index);
380 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableECalPID")) conf().
EnableEventWeight(SystId::kECalPID , index);
381 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableECalEmHipPID")) conf().
EnableEventWeight(SystId::kECalEmHipPID , index);
382 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableFGD2Shower")) conf().
EnableEventWeight(SystId::kFGD2Shower , index);
383 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuETPCPileUp")) conf().
EnableEventWeight(SystId::kNuETPCPileUp , index);
384 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuEP0DPileUp")) conf().
EnableEventWeight(SystId::kNuEP0DPileUp , index);
385 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuEECalPileUp")) conf().
EnableEventWeight(SystId::kNuEECalPileUp , index);
386 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableNuEOOFV")) conf().
EnableEventWeight(SystId::kNuEOOFV , index);
387 if (ND::params().GetParameterI(
"baseTrackerAnalysis.Weights.EnableP0DVeto")) conf().
EnableEventWeight(SystId::kP0DVeto , index);
393 AddZeroVarConfiguration();
398 void baseTrackerAnalysis::DefineMicroTrees(
bool addBase){
401 if (addBase) baseAnalysis::DefineMicroTrees(addBase);
405 AddVarI(output(), ntpctracks,
"number of tracks containing TPC");
406 AddVarI(output(), ntpcposQualityFV,
"number of positive tracks containing TPC, with good quality and in FV");
407 AddVarI(output(), ntpcnegQualityFV,
"number of negative tracks containing TPC, with good quality and in FV");
408 AddVarI(output(), nfgdtracks,
"number of tracks contining FGD and no TPC");
409 AddVarI(output(), nfgdonlytracks,
"number of tracks in FGD only");
413 AddVarFixVI(output(), chargeid_nwrong,
"number of tracks with wrong charge for each systematic bin", NMAXSYSTSOURCEBINS);
414 AddVarFixVI(output(), chargeid_ncorrect,
"number of tracks with correct charge for each systematic bin", NMAXSYSTSOURCEBINS);
415 AddVarFixVI(output(), tpcfgdmatch_nwrong,
"number of tracks with wrong tpcfgd match for each systematic bin", NMAXSYSTSOURCEBINS);
416 AddVarFixVI(output(), tpcfgdmatch_ncorrect,
"number of tracks with correct tpcfgd match for each systematic bin", NMAXSYSTSOURCEBINS);
417 AddVarFixVI(output(), tpctr_nwrong,
"number of tracks with wrong tpc tracking for each systematic bin", NMAXSYSTSOURCEBINS);
418 AddVarFixVI(output(), tpctr_ncorrect,
"number of tracks with correct tpc tracking for each systematic bin", NMAXSYSTSOURCEBINS);
419 AddVarFixVI(output(), fgdtr_nwrong,
"number of tracks with wrong fgd tracking for each systematic bin", NMAXSYSTSOURCEBINS);
420 AddVarFixVI(output(), fgdtr_ncorrect,
"number of tracks with correct fgd tracking for each systematic bin", NMAXSYSTSOURCEBINS);
421 AddVarFixVI(output(), fgdhybtr_nwrong,
"number of tracks with wrong fgdhyb tracking for each systematic bin", NMAXSYSTSOURCEBINS);
422 AddVarFixVI(output(), fgdhybtr_ncorrect,
"number of tracks with correct fgdhyb tracking for each systematic bin", NMAXSYSTSOURCEBINS);
423 AddVarFixVI(output(), meeff_nwrong,
"number of events with true me but no selected me for each systematic bin", NMAXSYSTSOURCEBINS);
424 AddVarFixVI(output(), meeff_ncorrect,
"number of events with true me and selected me for each systematic bin", NMAXSYSTSOURCEBINS);
425 AddVarFixVI(output(), mepur_nwrong,
"number of events with me found selected when no true me for each systematic bin", NMAXSYSTSOURCEBINS);
426 AddVarFixVI(output(), mepur_ncorrect,
"number of events with me found selected when true me exists for each systematic bin", NMAXSYSTSOURCEBINS);
428 AddVarFixVI(output(), tpc_ecal_match_ncorrect,
"number of events with correct tpc-ecal match for each systematic bin", NMAXSYSTSOURCEBINS);
429 AddVarFixVI(output(), tpc_ecal_match_nwrong,
"number of events with wrong tpc-ecal match for each systematic bin", NMAXSYSTSOURCEBINS);
431 AddVarFixVI(output(), tpc_p0d_match_ncorrect,
"number of events with correct tpc-p0d match for each systematic bin", NMAXSYSTSOURCEBINS);
432 AddVarFixVI(output(), tpc_p0d_match_nwrong,
"number of events with wrong tpc-p0d match for each systematic bin", NMAXSYSTSOURCEBINS);
434 AddVarFixVI(output(), fgd_ecal_match_ncorrect,
"number of events with correct fgd-ecal match for each systematic bin", NMAXSYSTSOURCEBINS);
435 AddVarFixVI(output(), fgd_ecal_match_nwrong,
"number of events with wrong fgd-ecal match for each systematic bin", NMAXSYSTSOURCEBINS);
437 AddVarFixVI(output(), fgd_ecal_smrd_match_ncorrect,
"number of events with correct fgd-ecal-smrd match for each systematic bin", NMAXSYSTSOURCEBINS);
438 AddVarFixVI(output(), fgd_ecal_smrd_match_nwrong,
"number of events with wrong fgd-ecal-srmd match for each systematic bin", NMAXSYSTSOURCEBINS);
440 AddVarFixVI(output(), ecal_tr_ncorrect,
"number of tracks with correct ecal tracking for each systematic bin", NMAXSYSTSOURCEBINS);
441 AddVarFixVI(output(), ecal_tr_nwrong,
"number of tracks with wrong ecal tracking for each systematic bin", NMAXSYSTSOURCEBINS);
443 AddVarFixVI(output(), ecal_pid_ncorrect,
"number of tracks with correct ecal PID for each systematic bin", NMAXSYSTSOURCEBINS);
444 AddVarFixVI(output(), ecal_pid_nwrong,
"number of tracks with wrong ecal PID for each systematic bin", NMAXSYSTSOURCEBINS);
446 AddVarFixVI(output(), ecal_emhippid_ncorrect,
"number of tracks with correct ecal EmHip PID for each systematic bin", NMAXSYSTSOURCEBINS);
447 AddVarFixVI(output(), ecal_emhippid_nwrong,
"number of tracks with wrong ecal EmHip PID for each systematic bin", NMAXSYSTSOURCEBINS);
449 AddVarFixVI(output(), fgd2shower_ncorrect,
"number of FGD1 tracks that do shower in FGD2 for each systematic bin", NMAXSYSTSOURCEBINS);
450 AddVarFixVI(output(), fgd2shower_nwrong,
"number of FGD1 tracks that do not shower in FGD2 for each systematic bin", NMAXSYSTSOURCEBINS);
456 void baseTrackerAnalysis::DefineTruthTree(){
459 baseAnalysis::DefineTruthTree();
463 void baseTrackerAnalysis::FillMicroTrees(
bool addBase){
466 if (addBase) baseAnalysis::FillMicroTreesBase(addBase);
474 output().
FillVar(ntpctracks,nTPC);
475 output().
FillVar(nfgdtracks,nFGD);
476 output().
FillVar(nfgdonlytracks,nFGDonly);
477 output().
FillVar(ntpcnegQualityFV,(Int_t)
box().nNegativeTPCtracks);
478 output().
FillVar(ntpcposQualityFV,(Int_t)
box().nPositiveTPCtracks);
482 for (UInt_t i=0;i<NMAXSYSTSOURCEBINS;i++){
483 output().
FillVectorVar(chargeid_ncorrect, _chargeid->_globalCharge->GetNCorrectAssoc(i), i);
484 output().
FillVectorVar(chargeid_nwrong, _chargeid->_globalCharge->GetNWrongAssoc(i), i);
485 output().
FillVectorVar(tpcfgdmatch_ncorrect, _tpcfgdmatch->GetNCorrectAssoc(i), i);
486 output().
FillVectorVar(tpcfgdmatch_nwrong, _tpcfgdmatch->GetNWrongAssoc(i), i);
487 output().
FillVectorVar(tpctr_ncorrect, _tpctr->GetNCorrectAssoc(i), i);
488 output().
FillVectorVar(tpctr_nwrong, _tpctr->GetNWrongAssoc(i), i);
489 output().
FillVectorVar(fgdtr_ncorrect, _fgdtr->_fgd1->GetNCorrectAssoc(i), i);
490 output().
FillVectorVar(fgdtr_nwrong, _fgdtr->_fgd1->GetNWrongAssoc(i), i);
491 output().
FillVectorVar(fgdhybtr_ncorrect, _fgdhybtr->_fgd1->GetNCorrectAssoc(i), i);
492 output().
FillVectorVar(fgdhybtr_nwrong, _fgdhybtr->_fgd1->GetNWrongAssoc(i), i);
493 output().
FillVectorVar(meeff_ncorrect, _me->_fgd1eff->GetNCorrectAssoc(i), i);
494 output().
FillVectorVar(meeff_nwrong, _me->_fgd1eff->GetNWrongAssoc(i), i);
495 output().
FillVectorVar(mepur_ncorrect, _me->_fgd1pur->GetNCorrectAssoc(i), i);
496 output().
FillVectorVar(mepur_nwrong, _me->_fgd1pur->GetNWrongAssoc(i), i);
498 output().
FillVectorVar(tpc_ecal_match_ncorrect, _tpc_ecal_matcheff->GetNCorrectAssoc(i), i);
499 output().
FillVectorVar(tpc_ecal_match_nwrong, _tpc_ecal_matcheff->GetNWrongAssoc(i), i);
501 output().
FillVectorVar(tpc_p0d_match_ncorrect, _tpc_p0d_matcheff->GetNCorrectAssoc(i), i);
502 output().
FillVectorVar(tpc_p0d_match_nwrong, _tpc_p0d_matcheff->GetNWrongAssoc(i), i);
504 output().
FillVectorVar(fgd_ecal_match_ncorrect, _fgd_ecal_matcheff->GetNCorrectAssoc(i), i);
505 output().
FillVectorVar(fgd_ecal_match_nwrong, _fgd_ecal_matcheff->GetNWrongAssoc(i), i);
507 output().
FillVectorVar(fgd_ecal_smrd_match_ncorrect, _fgd_ecal_smrd_matcheff->GetNCorrectAssoc(i), i);
508 output().
FillVectorVar(fgd_ecal_smrd_match_nwrong, _fgd_ecal_smrd_matcheff->GetNWrongAssoc(i), i);
510 output().
FillVectorVar(ecal_tr_ncorrect, _ecal_trackeff->GetNCorrectAssoc(i), i);
511 output().
FillVectorVar(ecal_tr_nwrong, _ecal_trackeff->GetNWrongAssoc(i), i);
513 output().
FillVectorVar(ecal_pid_ncorrect, _ecal_pid->GetNCorrectAssoc(i), i);
514 output().
FillVectorVar(ecal_pid_nwrong, _ecal_pid->GetNWrongAssoc(i), i);
516 output().
FillVectorVar(ecal_emhippid_ncorrect, _ecal_emhippid->GetNCorrectAssoc(i), i);
517 output().
FillVectorVar(ecal_emhippid_nwrong, _ecal_emhippid->GetNWrongAssoc(i), i);
519 output().
FillVectorVar(fgd2shower_ncorrect, _fgd2shower->GetNCorrectAssoc(i), i);
520 output().
FillVectorVar(fgd2shower_nwrong, _fgd2shower->GetNWrongAssoc(i), i);
528 void baseTrackerAnalysis::FillToyVarsInMicroTrees(
bool addBase){
531 if (addBase) baseAnalysis::FillToyVarsInMicroTreesBase(addBase);
539 baseAnalysis::FillTruthTreeBase(vtx, det, IsAntinu);
void DisableAllCorrections()
Disable all corrections in a given configuration (if conf=="" for all confs)
int GetAllTracksUsingOnlyDet(const AnaBunchB &bunch, SubDetId::SubDetEnum det, AnaTrackB *selTracks[])
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
TN-152 for a longer explanaition.
void AddCorrection(Int_t index, const std::string &name, CorrectionBase *corr)
void AddPackage(const std::string &name, const std::string &version)
Add a package.
void FillVectorVar(Int_t index, Float_t var, Int_t indx=-1)
Fill a vector variable.
bool _enableZeroVarConfig
bool _computeEfficiency
Compute analysis sample efficiency.
AnaBunch & GetBunch()
Get a casted AnaBunchBB to AnaBunch from the InputManager (TODO the protection)
virtual void DefineSystematics()
std::string GetSoftwareVersionFromPath(const std::string &path)
Get The software version from the path of the package.
Representation of a true Monte Carlo vertex.
virtual const ToyBoxTracker & box(Int_t isel=-1) const
Returns the ToyBoxTracker.
This class defines a correction that affects the reconstructed TPC Momentum of an.
SubDetEnum
Enumeration of all detector systems and subdetectors.
int GetAllTracksUsingFGDAndNoTPC(const AnaBunchB &bunch, AnaTrackB *selTracks[])
This is a normalization systematic. It takes into account the uncertainty on the FGD mass introduced ...
Representation of a global track.
This systematic evaluates the oofv systematic for nue analysis. At the moment a 30% rate unceratinty ...
void AddEventVariation(Int_t index, EventVariationBase *sys)
Add a new Event Variation provided its index in the manager and a pointer to it.
std::vector< ConfigurationBase * > & GetConfigurations()
return the vector of configurations
void AddEventWeight(Int_t index, EventWeightBase *sys)
Add a new Event Weight provided its index in the manager and a pointer to it.
void EnableEventWeight(Int_t syst, Int_t conf=-1)
Enable the systematic registered with the given index.
baseTrackerAnalysis(AnalysisAlgorithm *ana=NULL)
void EnableEventVariation(Int_t syst, Int_t conf=-1)
Enable the systematic registered with the given index.
void FillVar(Int_t index, Float_t var)
Fill a single variable.
TN-152 for a longer explanaition.
Charge confusion systematic. This is treated as an efficiency systematic, applying a weight to the ev...
This systematic smears the pull of each FGD track segment.
int GetAllTracksUsingDet(const AnaBunchB &bunch, SubDetId::SubDetEnum det, AnaTrackB *selTracks[])
This systematic smears the CT of each TPC track segment.
Michel electron effciency systematic.
virtual void DefineConfigurations()