CompareMD Class Reference

#include <CompareMD.h>

Inheritance diagram for CompareMD:
JobCModule

List of all members.

Public Member Functions

 CompareMD ()
 ~CompareMD ()
JobCResult Ana (const MomNavigator *mom)
void EndJob ()
void BeginJob ()
bool PassesBeamCuts (NueRecord *nr)
bool PassesCuts (NueRecord *nr)
TString MakeIdString (NueRecord *nr)
void FillFromList (NueRecord *nr, TString id, HistMan *hm, Float_t weight)
const RegistryDefaultConfig () const
void Config (const Registry &r)

Private Attributes

int counter
vector< TString > varName
vector< Float_t > beg
vector< Float_t > end
vector< Int_t > nbins
vector< TString > gtype
Int_t kNMCFiles

Detailed Description

Definition at line 23 of file CompareMD.h.


Constructor & Destructor Documentation

CompareMD::CompareMD (  ) 

Definition at line 30 of file CompareMD.cxx.

00030                     :
00031   counter(0),
00032   kNMCFiles(1)
00033 {}

CompareMD::~CompareMD (  ) 

Definition at line 37 of file CompareMD.cxx.

00038 {}


Member Function Documentation

JobCResult CompareMD::Ana ( const MomNavigator mom  )  [virtual]

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 125 of file CompareMD.cxx.

References BeamMon::bI, NueRecord::bmon, counter, FillFromList(), MomNavigator::FragmentIter(), NueHeader::GetEventNo(), RecRecordImp< T >::GetHeader(), NueHeader::GetRun(), VldContext::GetSimFlag(), NueHeader::GetSnarl(), RecHeader::GetVldContext(), SimFlag::kData, Msg::kDebug, Msg::kError, SimFlag::kMC, kNMCFiles, JobCResult::kPassed, MakeIdString(), MSG, PassesBeamCuts(), and PassesCuts().

00126 {
00127   //get all NueRecords from mom 
00128   //may have more than one per go since mom reads in a snarl's worth of data
00129   //so, this is a little more complicated than just asking for a NueRecord
00130   static Float_t total_pot = 0;
00131   static Int_t runno = -1;
00132   static Int_t snarlno = -1;
00133   static Int_t printpot = 1;
00134   TObject *obj=0;
00135   TIter objiter = mom->FragmentIter();
00136    while((obj=objiter.Next())){
00137       NueRecord *nr = static_cast<NueRecord *>(obj);
00138       if(nr){
00139          MSG("CompareMD",Msg::kDebug)<<"Found a NueRecord in MOM"<<endl;
00140       }
00141       else{
00142          MSG("CompareMD",Msg::kError)<<"Didn't find a NueRecord in MOM"<<endl;
00143          continue;
00144       }
00145       MSG("CompareMD",Msg::kDebug)<<"Found a NueRecord "<<nr<<endl;
00146 
00147       SimFlag::SimFlag_t s = nr->GetHeader().GetVldContext().GetSimFlag();
00148 
00149 //  need at least 1 sucessfully reconstructed event
00150    
00151      if(counter%1000==0){
00152          cout<<"On entry "<<counter<<endl;
00153      }
00154       counter++;
00155           
00156       
00157       if(nr->GetHeader().GetEventNo()<0){
00158         continue;
00159       }
00160 
00161       if(PassesBeamCuts(nr)){
00162         if (s==SimFlag::kData){
00163           if (runno != nr->GetHeader().GetRun()||
00164               runno == nr->GetHeader().GetRun()&&
00165               snarlno != nr->GetHeader().GetSnarl()){
00166             total_pot += nr->bmon.bI;
00167             //cout<<"total_pot "<<total_pot<<endl;
00168             runno = nr->GetHeader().GetRun();
00169             snarlno = nr->GetHeader().GetSnarl();
00170           }
00171         }
00172         if (PassesCuts(nr)){
00173           if(s==SimFlag::kData){
00174             TString id = MakeIdString(nr);
00175             static HistMan *hm = new HistMan("allcomp");
00176             FillFromList(nr,id,hm,1.);
00177           }
00178           else if (s==SimFlag::kMC){
00179             if (printpot) {
00180               cout<<"Total POTs "<<total_pot<<endl;
00181               printpot=0;
00182             }      
00183             TString id = MakeIdString(nr);
00184             static HistMan *hm = new HistMan("allcomp");
00185             FillFromList(nr,id,hm,total_pot/(kNMCFiles*550*24.));
00186             TString idall = "_m_all";
00187             FillFromList(nr,idall,hm,total_pot/(kNMCFiles*550*24.));
00188           }
00189         }
00190       }
00191 /*
00192 
00193       //fill histograms      
00194           FillShwFit(hm, param,nr);
00195           FillHitCalc(hm, param,nr);
00196           FillAng(hm, param,nr);
00197           FillFracVar(hm, param,nr);
00198           FillMST(hm, param,nr);
00199           FillSREvent(hm, param,nr);
00200           FillSRTrack(hm, param,nr);
00201           FillSRShw(hm, param,nr);
00202           FillBMon(hm,param,nr);
00203           FillTruth(hm,param,nr);
00204           FillAnalysis(hm,param,nr);
00205       }
00206 */
00207 
00208 
00209    }
00210    return JobCResult::kPassed; // kNoDecision, kFailed, etc.
00211 }

void CompareMD::BeginJob ( void   )  [virtual]

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 41 of file CompareMD.cxx.

References beg, HistMan::Book(), counter, end, gtype, nbins, and varName.

00042 {
00043 
00044   if(counter%1000==0){
00045     cout<<"On entry "<<counter<<endl;
00046   }
00047   counter++;
00048 
00049   TString dumName, dumtype;
00050   Float_t dumstart, dumend;
00051   Int_t dumbins, nvar;
00052   ifstream ins;
00053   ins.open("AllParam.txt");
00054 
00055   nvar = 0;
00056 
00057   //read in the file
00058   while(!ins.eof()) {
00059       ins>>dumName>>dumstart>>dumend>>dumbins>>dumtype;
00060       if(!ins.eof()){
00061           varName.push_back(dumName);
00062           beg.push_back(dumstart);  end.push_back(dumend);
00063           nbins.push_back(dumbins);   gtype.push_back(dumtype);
00064           nvar++;
00065          }
00066     }
00067   cout<<nvar<<" variables read in"<<endl;
00068 
00069 
00070  
00071  static HistMan *hm = new HistMan("allcomp");
00072 
00073   for(int d=0;d<2;d++){
00074     char dm[3];
00075     if(d==0){
00076        sprintf(dm,"_d");
00077     }
00078     else if(d==1){
00079       sprintf(dm,"_m");
00080     }
00081     else{
00082       sprintf(dm,"_u");
00083     }
00084     if (d==0){//data
00085       char id[20];
00086       sprintf(id,"%s",dm);
00087       for(UInt_t l = 0; l < varName.size(); l++){
00088         TString param = varName[l] + id;
00089         hm->Book<TH1F>(param,param,nbins[l],beg[l],end[l]);
00090       }
00091     }
00092     else {//mc
00093       for(int b=0;b<5;b++){
00094         char bgc[6];
00095         if(b==0){
00096           sprintf(bgc,"all");
00097         }
00098         else if(b==1){
00099           sprintf(bgc,"numu");
00100         }
00101         else if(b==2){
00102           sprintf(bgc,"nutau");
00103         }
00104         else if(b==3){
00105           sprintf(bgc,"nc");
00106         }
00107         else if(b==4){
00108           sprintf(bgc,"bnue");
00109         } 
00110         else{
00111           sprintf(bgc,"u");
00112         }
00113      
00114         char id[20];
00115         sprintf(id,"%s_%s",dm,bgc);
00116 
00117         for(UInt_t l = 0; l < varName.size(); l++){
00118            TString param = varName[l] + id;
00119            hm->Book<TH1F>(param,param,nbins[l],beg[l],end[l]);
00120         }
00121       }
00122     }
00123   }
00124 }

void CompareMD::Config ( const Registry r  )  [virtual]

Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables.

Reimplemented from JobCModule.

Definition at line 1551 of file CompareMD.cxx.

References Registry::Get(), and kNMCFiles.

01552 {
01553 //======================================================================
01554 // Configure the module given the Registry r
01555 //======================================================================
01556 
01557   int imps;
01558   if(r.Get("NMCFiles",imps)) { kNMCFiles=imps;}
01559 
01560 }

const Registry & CompareMD::DefaultConfig ( void   )  const [virtual]

Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like:

const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; }

Reimplemented from JobCModule.

Definition at line 1528 of file CompareMD.cxx.

References JobCModule::GetName(), Registry::LockValues(), Registry::Set(), and Registry::UnLockValues().

01529 {
01530 //======================================================================
01531 // Supply the default configuration for the module
01532 //======================================================================
01533 
01534   static Registry r; // Default configuration for module
01535 
01536   // Set name of config
01537   std::string name = this->GetName();
01538   name += ".config.default";
01539   r.SetName(name.c_str());
01540 
01541   // Set values in configuration
01542   r.UnLockValues();
01543   r.Set("NMCFiles","1");
01544   r.LockValues();
01545 
01546   return r;
01547 }

void CompareMD::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 214 of file CompareMD.cxx.

00215 {}

void CompareMD::FillFromList ( NueRecord nr,
TString  id,
HistMan hm,
Float_t  weight 
)

Definition at line 343 of file CompareMD.cxx.

References NueRecord::anainfo, NueRecord::angcluster, NueRecord::angclusterfit, ANtpTrackInfo::begPlane, ANtpShowerInfo::begPlane, ANtpEventInfo::begPlane, Shwfit::caldet_comp, Shwfit::chisq, Shwfit::chisq_ndf, Shwfit::conv, ANtpShowerInfo::dcosX, ANtpTrackInfo::dcosXEnd, ANtpTrackInfo::dcosXVtx, ANtpShowerInfo::dcosY, ANtpTrackInfo::dcosYEnd, ANtpTrackInfo::dcosYVtx, ANtpShowerInfo::dcosZ, ANtpTrackInfo::dcosZEnd, ANtpTrackInfo::dcosZVtx, Shwfit::e0_pe_ratio, MSTCalc::e4nn, MSTCalc::e4sm, MSTCalc::e4w, MSTCalc::eallm1, MSTCalc::eallw1, MSTCalc::ealpha, MSTCalc::eb1, MSTCalc::eb25, MSTCalc::ebeta, MSTCalc::eeprob, MSTCalc::enbranch, ANtpEventInfo::endPlane, ANtpTrackInfo::endPlane, ANtpShowerInfo::endPlane, ANtpTrackInfo::endX, ANtpTrackInfo::endY, ANtpTrackInfo::endZ, ANtpEventInfo::energyGeV, MSTCalc::enmsg, MSTCalc::enn1, MSTCalc::enntot, MSTCalc::esm1, MSTCalc::esmtot, MSTCalc::ew1, MSTCalc::ewtot, AngClusterFit::fACluFitE0EnergyRatio, AngClusterFit::fACluFitKurt, AngClusterFit::fACluFitLongChiSq, AngClusterFit::fACluFitLongConv, AngClusterFit::fACluFitLongNDF, AngClusterFit::fACluFitMean, AngClusterFit::fACluFitMolRadPeak, AngClusterFit::fACluFitMolRadVert, AngClusterFit::fACluFitParA, AngClusterFit::fACluFitParB, AngClusterFit::fACluFitParC12, AngClusterFit::fACluFitParL1, AngClusterFit::fACluFitParL2, AngClusterFit::fACluFitParLongE0, AngClusterFit::fACluFitParTransE0, AngClusterFit::fACluFitRMS, AngClusterFit::fACluFitShwMax, AngClusterFit::fACluFitSkew, AngClusterFit::fACluFitTransChiSq, AngClusterFit::fACluFitTransConv, AngClusterFit::fACluFitTransNDF, AngCluster::fACluRmsShwAxis, AngCluster::fACluRmsZAxis, AngCluster::fACluShwDirX, AngCluster::fACluShwDirY, AngCluster::fACluShwDirZ, HitCalc::fHitFarAngle, HitCalc::fHitFarMomBalance, HitCalc::fHitLongEnergy, HitCalc::fHitLongEnergyRatio, HitCalc::fHitPeakAngle, HitCalc::fHitPeakMomBalance, HitCalc::fHitTotalEnergy, HitCalc::fHitTransCMEnergy, HitCalc::fHitTransCMEnergyRatio, HitCalc::fHitTransEnergy, HitCalc::fHitTransEnergyRatio, HitCalc::fHitTransLongEnergyRatio, HistMan::Fill1d(), ANtpTrackInfo::fitMomentum, FracVar::fract_10_counters, FracVar::fract_12_counters, FracVar::fract_1_plane, FracVar::fract_2_counters, FracVar::fract_2_planes, FracVar::fract_3_planes, FracVar::fract_4_counters, FracVar::fract_4_planes, FracVar::fract_5_planes, FracVar::fract_6_counters, FracVar::fract_6_planes, FracVar::fract_8_counters, FracVar::fract_road, NueRecord::fracvars, NueHeader::GetEventNo(), NueHeader::GetEvents(), RecRecordImp< T >::GetHeader(), NueHeader::GetRun(), NueHeader::GetSnarl(), NueHeader::GetSubRun(), NueHeader::GetTrackLength(), NueRecord::hitcalc, ANtpEventInfo::index, AnalysisInfoNue::inFiducialVolume, ANtpDefaultValue::IsDefault(), AnalysisInfoNue::isFullyContained, ANtpTrackInfo::length, Shwfit::max_pe_plane, NueRecord::mstvars, MSTCalc::o4nn, MSTCalc::o4sm, MSTCalc::o4w, MSTCalc::oallm1, MSTCalc::oallw1, MSTCalc::oalpha, MSTCalc::ob1, MSTCalc::ob25, MSTCalc::obeta, MSTCalc::oeprob, MSTCalc::onbranch, MSTCalc::onmsg, MSTCalc::onn1, MSTCalc::onntot, MSTCalc::osm1, MSTCalc::osmtot, MSTCalc::ow1, MSTCalc::owtot, Shwfit::par_a, Shwfit::par_b, Shwfit::par_e0, ANtpTrackInfo::passedFit, ANtpEventInfo::passStrips, ANtpEventInfoNue::phMeu, ANtpEventInfoNue::phNueGeV, FracVar::pid, ANtpShowerInfoNue::planeRatio, ANtpShowerInfo::planes, ANtpTrackInfo::planes, ANtpEventInfo::planes, ANtpTrackInfo::pulseHeight, ANtpEventInfo::pulseHeight, ANtpShowerInfo::pulseHeight, ANtpShowerInfoNue::pulseHeightRatio, ANtpTrackInfoNue::pulseHeightRatio, ANtpTrackInfo::rangeMomentum, ANtpTrackInfo::reducedChi2, ANtpEventInfo::showers, FracVar::shw_max, FracVar::shw_npl, FracVar::shw_nstp, NueRecord::shwfit, Shwfit::shwmax, Shwfit::shwmaxplane, Shwfit::shwmaxplane_diff, ANtpTrackInfo::sigmaQoverP, size, NueRecord::srevent, NueRecord::srshower, NueRecord::srtrack, ANtpShowerInfoNue::stripRatio, ANtpEventInfoNue::timeLength, ANtpTrackInfo::totalStrips, ANtpShowerInfo::totalStrips, ANtpEventInfo::totalStrips, ANtpTrackInfo::traceEnd, ANtpTrackInfo::traceEndZ, ANtpTrackInfo::traceVtx, ANtpTrackInfo::traceVtxZ, ANtpEventInfo::tracks, ANtpEventInfoNue::triggerPass, ANtpTrackInfoNue::trklikePlanes, ANtpTrackInfoNue::trklikeRatio, Shwfit::u_asym_peak, Shwfit::u_asym_vert, Shwfit::u_kurt, Shwfit::u_mean, Shwfit::u_molrad_peak, Shwfit::u_molrad_vert, Shwfit::u_rms, Shwfit::u_skew, Shwfit::uv_asym_peak, Shwfit::uv_asym_vert, Shwfit::uv_kurt, Shwfit::uv_mean, Shwfit::uv_molrad_peak, Shwfit::uv_molrad_vert, Shwfit::uv_ratio, Shwfit::uv_rms, Shwfit::uv_skew, Shwfit::v_asym_peak, Shwfit::v_asym_vert, Shwfit::v_kurt, Shwfit::v_mean, Shwfit::v_molrad_peak, Shwfit::v_molrad_vert, Shwfit::v_rms, Shwfit::v_skew, varName, ANtpShowerInfo::vtxX, ANtpEventInfo::vtxX, ANtpTrackInfo::vtxX, ANtpShowerInfo::vtxY, ANtpEventInfo::vtxY, ANtpTrackInfo::vtxY, ANtpShowerInfo::vtxZ, ANtpEventInfo::vtxZ, and ANtpTrackInfo::vtxZ.

Referenced by Ana().

00344 {
00345     Int_t pos = 0;
00346     Int_t size = varName.size();
00347     if(varName.size() == 0) return;
00348     TString hname;
00349     Int_t lastpos = -1;
00350         
00351     for(int i = 0; i < 5; i++){ 
00352 //         cout<<"starting loop "<<i<<"   "<<pos<<endl;
00353      if(varName[pos] == "fHeader.fSnarl") {
00354          if ( !ANtpDefVal::IsDefault(nr->GetHeader().GetSnarl())) {
00355           hname = varName[pos]+id;
00356           hm->Fill1d(hname,nr->GetHeader().GetSnarl(),weight);
00357           } pos++; if(pos >= size) return;
00358      }if(varName[pos] == "fHeader.fRun") {
00359          if(!ANtpDefVal::IsDefault(nr->GetHeader().GetRun())){
00360           hname = varName[pos]+id;
00361           hm->Fill1d(hname,nr->GetHeader().GetRun(),weight);
00362           } pos++; if(pos >= size) return;
00363      }if(varName[pos] == "fHeader.fSubRun") {
00364          if(!ANtpDefVal::IsDefault(nr->GetHeader().GetSubRun())){
00365           hname = varName[pos]+id;
00366           hm->Fill1d(hname,nr->GetHeader().GetSubRun(),weight);
00367           } pos++; if(pos >= size) return;
00368      }if(varName[pos] == "fHeader.fEvtNo") {
00369          if(!ANtpDefVal::IsDefault(nr->GetHeader().GetEventNo())){
00370           hname = varName[pos]+id;
00371           hm->Fill1d(hname,nr->GetHeader().GetEventNo(),weight);
00372           } pos++; if(pos >= size) return;
00373      }if(varName[pos] == "fHeader.fEvents") {
00374          if(!ANtpDefVal::IsDefault(nr->GetHeader().GetEvents())){
00375           hname = varName[pos]+id;
00376           hm->Fill1d(hname,nr->GetHeader().GetEvents(),weight);
00377           } pos++; if(pos >= size) return;
00378      }if(varName[pos] == "fHeader.fTrackLength") {
00379          if(!ANtpDefVal::IsDefault(nr->GetHeader().GetTrackLength())){
00380           hname = varName[pos]+id;
00381           hm->Fill1d(hname,nr->GetHeader().GetTrackLength(),weight);
00382           } pos++; if(pos >= size) return;
00383      }
00384 
00385 //  End of fHeader
00386 //  Start of Shwfit
00387  
00388 if(varName[pos] == "shwfit.par_a") {
00389        if(!ANtpDefVal::IsDefault(nr->shwfit.par_a)){
00390           hname = varName[pos]+id;
00391           hm->Fill1d(hname,nr->shwfit.par_a,weight);
00392           } pos++; if(pos >= size) return;
00393      }if(varName[pos] == "shwfit.par_b") {
00394        if(!ANtpDefVal::IsDefault(nr->shwfit.par_b)){
00395           hname = varName[pos]+id;
00396           hm->Fill1d(hname,nr->shwfit.par_b,weight);
00397           } pos++; if(pos >= size) return;
00398      }
00399 
00400      if(varName[pos] == "shwfit.par_e0") {
00401        if(!ANtpDefVal::IsDefault(nr->shwfit.par_e0)){
00402           hname = varName[pos]+id;
00403 //        cout<<"Filling "<<nr->shwfit.par_e0<<endl;
00404           hm->Fill1d(hname,nr->shwfit.par_e0,weight);
00405           } pos++; if(pos >= size) return;
00406      }
00407  if(varName[pos] == "shwfit.chisq") {
00408        if(!ANtpDefVal::IsDefault(nr->shwfit.chisq)){
00409           hname = varName[pos]+id;
00410           hm->Fill1d(hname,nr->shwfit.chisq,weight);
00411           } pos++; if(pos >= size) return;
00412      }if(varName[pos] == "shwfit.shwmax") {
00413        if(!ANtpDefVal::IsDefault(nr->shwfit.shwmax)){
00414           hname = varName[pos]+id;
00415           hm->Fill1d(hname,nr->shwfit.shwmax,weight);
00416           } pos++; if(pos >= size) return;
00417      }if(varName[pos] == "shwfit.shwmaxplane") {
00418        if(!ANtpDefVal::IsDefault(nr->shwfit.shwmaxplane)){
00419           hname = varName[pos]+id;
00420           hm->Fill1d(hname,nr->shwfit.shwmaxplane,weight);
00421           } pos++; if(pos >= size) return;
00422      }if(varName[pos] == "shwfit.conv") {
00423        if(!ANtpDefVal::IsDefault(nr->shwfit.conv)){
00424           hname = varName[pos]+id;
00425           hm->Fill1d(hname,nr->shwfit.conv,weight);
00426           } pos++; if(pos >= size) return;
00427      }if(varName[pos] == "shwfit.chisq_ndf") {
00428        if(!ANtpDefVal::IsDefault(nr->shwfit.chisq_ndf)){
00429           hname = varName[pos]+id;
00430           hm->Fill1d(hname,nr->shwfit.chisq_ndf,weight);
00431           } pos++; if(pos >= size) return;
00432      }if(varName[pos] == "shwfit.e0_pe_ratio") {
00433        if(!ANtpDefVal::IsDefault(nr->shwfit.e0_pe_ratio)){
00434           hname = varName[pos]+id;
00435           hm->Fill1d(hname,nr->shwfit.e0_pe_ratio,weight);
00436           } pos++; if(pos >= size) return;
00437      }if(varName[pos] == "shwfit.caldet_comp") {
00438        if(!ANtpDefVal::IsDefault(nr->shwfit.caldet_comp)){
00439           hname = varName[pos]+id;
00440           hm->Fill1d(hname,nr->shwfit.caldet_comp,weight);
00441           } pos++; if(pos >= size) return;
00442      }if(varName[pos] == "shwfit.max_pe_plane") {
00443        if(!ANtpDefVal::IsDefault(nr->shwfit.max_pe_plane)){
00444           hname = varName[pos]+id;
00445           hm->Fill1d(hname,nr->shwfit.max_pe_plane,weight);
00446           } pos++; if(pos >= size) return;
00447      }if(varName[pos] == "shwfit.shwmaxplane_diff") {
00448        if(!ANtpDefVal::IsDefault(nr->shwfit.shwmaxplane_diff)){
00449           hname = varName[pos]+id;
00450           hm->Fill1d(hname,nr->shwfit.shwmaxplane_diff,weight);
00451           } pos++; if(pos >= size) return;
00452      }if(varName[pos] == "shwfit.u_asym_peak") {
00453        if(!ANtpDefVal::IsDefault(nr->shwfit.u_asym_peak)){
00454           hname = varName[pos]+id;
00455           hm->Fill1d(hname,nr->shwfit.u_asym_peak,weight);
00456           } pos++; if(pos >= size) return;
00457      }if(varName[pos] == "shwfit.u_asym_vert") {
00458        if(!ANtpDefVal::IsDefault(nr->shwfit.u_asym_vert)){
00459           hname = varName[pos]+id;
00460           hm->Fill1d(hname,nr->shwfit.u_asym_vert,weight);
00461           } pos++; if(pos >= size) return;
00462      }if(varName[pos] == "shwfit.u_molrad_peak") {
00463        if(!ANtpDefVal::IsDefault(nr->shwfit.u_molrad_peak)){
00464           hname = varName[pos]+id;
00465           hm->Fill1d(hname,nr->shwfit.u_molrad_peak,weight);
00466           } pos++; if(pos >= size) return;
00467      }if(varName[pos] == "shwfit.u_molrad_vert") {
00468        if(!ANtpDefVal::IsDefault(nr->shwfit.u_molrad_vert)){
00469           hname = varName[pos]+id;
00470           hm->Fill1d(hname,nr->shwfit.u_molrad_vert,weight);
00471           } pos++; if(pos >= size) return;
00472      }if(varName[pos] == "shwfit.u_mean") {
00473        if(!ANtpDefVal::IsDefault(nr->shwfit.u_mean)){
00474           hname = varName[pos]+id;
00475           hm->Fill1d(hname,nr->shwfit.u_mean,weight);
00476           } pos++; if(pos >= size) return;
00477      }if(varName[pos] == "shwfit.u_rms") {
00478        if(!ANtpDefVal::IsDefault(nr->shwfit.u_rms)){
00479           hname = varName[pos]+id;
00480           hm->Fill1d(hname,nr->shwfit.u_rms,weight);
00481           } pos++; if(pos >= size) return;
00482      }if(varName[pos] == "shwfit.u_skew") {
00483        if(!ANtpDefVal::IsDefault(nr->shwfit.u_skew)){
00484           hname = varName[pos]+id;
00485           hm->Fill1d(hname,nr->shwfit.u_skew,weight);
00486           } pos++; if(pos >= size) return;
00487      }if(varName[pos] == "shwfit.u_kurt") {
00488        if(!ANtpDefVal::IsDefault(nr->shwfit.u_kurt)){
00489           hname = varName[pos]+id;
00490           hm->Fill1d(hname,nr->shwfit.u_kurt,weight);
00491           } pos++; if(pos >= size) return;
00492      }if(varName[pos] == "shwfit.v_asym_peak") {
00493        if(!ANtpDefVal::IsDefault(nr->shwfit.v_asym_peak)){
00494           hname = varName[pos]+id;
00495           hm->Fill1d(hname,nr->shwfit.v_asym_peak,weight);
00496           } pos++; if(pos >= size) return;
00497      }if(varName[pos] == "shwfit.v_asym_vert") {
00498        if(!ANtpDefVal::IsDefault(nr->shwfit.v_asym_vert)){
00499           hname = varName[pos]+id;
00500           hm->Fill1d(hname,nr->shwfit.v_asym_vert,weight);
00501           } pos++; if(pos >= size) return;
00502      }if(varName[pos] == "shwfit.v_molrad_peak") {
00503        if(!ANtpDefVal::IsDefault(nr->shwfit.v_molrad_peak)){
00504           hname = varName[pos]+id;
00505           hm->Fill1d(hname,nr->shwfit.v_molrad_peak,weight);
00506           } pos++; if(pos >= size) return;
00507      }if(varName[pos] == "shwfit.v_molrad_vert") {
00508        if(!ANtpDefVal::IsDefault(nr->shwfit.v_molrad_vert)){
00509           hname = varName[pos]+id;
00510           hm->Fill1d(hname,nr->shwfit.v_molrad_vert,weight);
00511           } pos++; if(pos >= size) return;
00512      }if(varName[pos] == "shwfit.v_mean") {
00513        if(!ANtpDefVal::IsDefault(nr->shwfit.v_mean)){
00514           hname = varName[pos]+id;
00515           hm->Fill1d(hname,nr->shwfit.v_mean,weight);
00516           } pos++; if(pos >= size) return;
00517      }if(varName[pos] == "shwfit.v_rms") {
00518        if(!ANtpDefVal::IsDefault(nr->shwfit.v_rms)){
00519           hname = varName[pos]+id;
00520           hm->Fill1d(hname,nr->shwfit.v_rms,weight);
00521           } pos++; if(pos >= size) return;
00522      }if(varName[pos] == "shwfit.v_skew") {
00523        if(!ANtpDefVal::IsDefault(nr->shwfit.v_skew)){
00524           hname = varName[pos]+id;
00525           hm->Fill1d(hname,nr->shwfit.v_skew,weight);
00526           } pos++; if(pos >= size) return;
00527      }if(varName[pos] == "shwfit.v_kurt") {
00528        if(!ANtpDefVal::IsDefault(nr->shwfit.v_kurt)){
00529           hname = varName[pos]+id;
00530           hm->Fill1d(hname,nr->shwfit.v_kurt,weight);
00531           } pos++; if(pos >= size) return;
00532      }if(varName[pos] == "shwfit.uv_asym_peak") {
00533        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_asym_peak)){
00534           hname = varName[pos]+id;
00535           hm->Fill1d(hname,nr->shwfit.uv_asym_peak,weight);
00536           } pos++; if(pos >= size) return;
00537      }if(varName[pos] == "shwfit.uv_asym_vert") {
00538        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_asym_vert)){
00539           hname = varName[pos]+id;
00540           hm->Fill1d(hname,nr->shwfit.uv_asym_vert,weight);
00541           } pos++; if(pos >= size) return;
00542      }if(varName[pos] == "shwfit.uv_molrad_peak") {
00543        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_molrad_peak)){
00544           hname = varName[pos]+id;
00545           hm->Fill1d(hname,nr->shwfit.uv_molrad_peak,weight);
00546           } pos++; if(pos >= size) return;
00547      }if(varName[pos] == "shwfit.uv_molrad_vert") {
00548        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_molrad_vert)){
00549           hname = varName[pos]+id;
00550           hm->Fill1d(hname,nr->shwfit.uv_molrad_vert,weight);
00551           } pos++; if(pos >= size) return;
00552      }if(varName[pos] == "shwfit.uv_mean") {
00553        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_mean)){
00554           hname = varName[pos]+id;
00555           hm->Fill1d(hname,nr->shwfit.uv_mean,weight);
00556           } pos++; if(pos >= size) return;
00557      }if(varName[pos] == "shwfit.uv_rms") {
00558        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_rms)){
00559           hname = varName[pos]+id;
00560           hm->Fill1d(hname,nr->shwfit.uv_rms,weight);
00561           } pos++; if(pos >= size) return;
00562      }if(varName[pos] == "shwfit.uv_skew") {
00563        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_skew)){
00564           hname = varName[pos]+id;
00565           hm->Fill1d(hname,nr->shwfit.uv_skew,weight);
00566           } pos++; if(pos >= size) return;
00567      }if(varName[pos] == "shwfit.uv_kurt") {
00568        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_kurt)){
00569           hname = varName[pos]+id;
00570           hm->Fill1d(hname,nr->shwfit.uv_kurt,weight);
00571           } pos++; if(pos >= size) return;
00572      }if(varName[pos] == "shwfit.uv_ratio") {
00573        if(!ANtpDefVal::IsDefault(nr->shwfit.uv_ratio)){
00574           hname = varName[pos]+id;
00575           hm->Fill1d(hname,nr->shwfit.uv_ratio,weight);
00576           } pos++; if(pos >= size) return;
00577      }
00578 
00579 //end of shwfitcalc
00580 
00581 //start of hitcalc
00582 if(varName[pos] == "hitcalc.fHitTotalEnergy") {
00583        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitTotalEnergy)){
00584           hname = varName[pos]+id;
00585           hm->Fill1d(hname,nr->hitcalc.fHitTotalEnergy,weight);
00586           } pos++; if(pos >= size) return;
00587      }if(varName[pos] == "hitcalc.fHitTransEnergy") {
00588        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitTransEnergy)){
00589           hname = varName[pos]+id;
00590           hm->Fill1d(hname,nr->hitcalc.fHitTransEnergy,weight);
00591           } pos++; if(pos >= size) return;
00592      }if(varName[pos] == "hitcalc.fHitLongEnergy") {
00593        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitLongEnergy)){
00594           hname = varName[pos]+id;
00595           hm->Fill1d(hname,nr->hitcalc.fHitLongEnergy,weight);
00596           } pos++; if(pos >= size) return;
00597      }if(varName[pos] == "hitcalc.fHitTransCMEnergy") {
00598        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitTransCMEnergy)){
00599           hname = varName[pos]+id;
00600           hm->Fill1d(hname,nr->hitcalc.fHitTransCMEnergy,weight);
00601           } pos++; if(pos >= size) return;
00602      }if(varName[pos] == "hitcalc.fHitTransEnergyRatio") {
00603        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitTransEnergyRatio)){
00604           hname = varName[pos]+id;
00605           hm->Fill1d(hname,nr->hitcalc.fHitTransEnergyRatio,weight);
00606           } pos++; if(pos >= size) return;
00607      }if(varName[pos] == "hitcalc.fHitLongEnergyRatio") {
00608        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitLongEnergyRatio)){
00609           hname = varName[pos]+id;
00610           hm->Fill1d(hname,nr->hitcalc.fHitLongEnergyRatio,weight);
00611           } pos++; if(pos >= size) return;
00612      }if(varName[pos] == "hitcalc.fHitTransLongEnergyRatio") {
00613        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitTransLongEnergyRatio)){
00614           hname = varName[pos]+id;
00615           hm->Fill1d(hname,nr->hitcalc.fHitTransLongEnergyRatio,weight);
00616           } pos++; if(pos >= size) return;
00617      }if(varName[pos] == "hitcalc.fHitTransCMEnergyRatio") {
00618        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitTransCMEnergyRatio)){
00619           hname = varName[pos]+id;
00620           hm->Fill1d(hname,nr->hitcalc.fHitTransCMEnergyRatio,weight);
00621           } pos++; if(pos >= size) return;
00622      }if(varName[pos] == "hitcalc.fHitFarMomBalance") {
00623        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitFarMomBalance)){
00624           hname = varName[pos]+id;
00625           hm->Fill1d(hname,nr->hitcalc.fHitFarMomBalance,weight);
00626           } pos++; if(pos >= size) return;
00627      }if(varName[pos] == "hitcalc.fHitPeakMomBalance") {
00628        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitPeakMomBalance)){
00629           hname = varName[pos]+id;
00630           hm->Fill1d(hname,nr->hitcalc.fHitPeakMomBalance,weight);
00631           } pos++; if(pos >= size) return;
00632      }if(varName[pos] == "hitcalc.fHitFarAngle") {
00633        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitFarAngle)){
00634           hname = varName[pos]+id;
00635           hm->Fill1d(hname,nr->hitcalc.fHitFarAngle,weight);
00636           } pos++; if(pos >= size) return;
00637      }if(varName[pos] == "hitcalc.fHitPeakAngle") {
00638        if(!ANtpDefVal::IsDefault(nr->hitcalc.fHitPeakAngle)){
00639           hname = varName[pos]+id;
00640           hm->Fill1d(hname,nr->hitcalc.fHitPeakAngle,weight);
00641           } pos++; if(pos >= size) return;
00642      }
00643 
00644 //end of hitcalc
00645 //start of angcluster
00646 if(varName[pos] == "angcluster.fACluRmsShwAxis") {
00647        if(!ANtpDefVal::IsDefault(nr->angcluster.fACluRmsShwAxis)){
00648           hname = varName[pos]+id;
00649           hm->Fill1d(hname,nr->angcluster.fACluRmsShwAxis,weight);
00650           } pos++; if(pos >= size) return;
00651      }if(varName[pos] == "angcluster.fACluRmsZAxis") {
00652        if(!ANtpDefVal::IsDefault(nr->angcluster.fACluRmsZAxis)){
00653           hname = varName[pos]+id;
00654           hm->Fill1d(hname,nr->angcluster.fACluRmsZAxis,weight);
00655           } pos++; if(pos >= size) return;
00656      }if(varName[pos] == "angcluster.fACluShwDirX") {
00657        if(!ANtpDefVal::IsDefault(nr->angcluster.fACluShwDirX)){
00658           hname = varName[pos]+id;
00659           hm->Fill1d(hname,nr->angcluster.fACluShwDirX,weight);
00660           } pos++; if(pos >= size) return;
00661      }if(varName[pos] == "angcluster.fACluShwDirY") {
00662        if(!ANtpDefVal::IsDefault(nr->angcluster.fACluShwDirY)){
00663           hname = varName[pos]+id;
00664           hm->Fill1d(hname,nr->angcluster.fACluShwDirY,weight);
00665           } pos++; if(pos >= size) return;
00666      }if(varName[pos] == "angcluster.fACluShwDirZ") {
00667        if(!ANtpDefVal::IsDefault(nr->angcluster.fACluShwDirZ)){
00668           hname = varName[pos]+id;
00669           hm->Fill1d(hname,nr->angcluster.fACluShwDirZ,weight);
00670           } pos++; if(pos >= size) return;
00671      }
00672      if(varName[pos] == "angclusterfit.fACluFitParA") {
00673        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParA)){
00674           hname = varName[pos]+id;
00675           hm->Fill1d(hname,nr->angclusterfit.fACluFitParA,weight);
00676           } pos++; if(pos >= size) return;
00677      }if(varName[pos] == "angclusterfit.fACluFitParB") {
00678        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParB)){
00679           hname = varName[pos]+id;
00680           hm->Fill1d(hname,nr->angclusterfit.fACluFitParB,weight);
00681           } pos++; if(pos >= size) return;
00682      }if(varName[pos] == "angclusterfit.fACluFitParLongE0") {
00683        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParLongE0)){
00684           hname = varName[pos]+id;
00685           hm->Fill1d(hname,nr->angclusterfit.fACluFitParLongE0,weight);
00686           } pos++; if(pos >= size) return;
00687      }if(varName[pos] == "angclusterfit.fACluFitShwMax") {
00688        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitShwMax)){
00689           hname = varName[pos]+id;
00690           hm->Fill1d(hname,nr->angclusterfit.fACluFitShwMax,weight);
00691           } pos++; if(pos >= size) return;
00692      }if(varName[pos] == "angclusterfit.fACluFitE0EnergyRatio") {
00693        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitE0EnergyRatio)){
00694           hname = varName[pos]+id;
00695           hm->Fill1d(hname,nr->angclusterfit.fACluFitE0EnergyRatio,weight);
00696           } pos++; if(pos >= size) return;
00697      }
00698      if(varName[pos] == "angclusterfit.fACluFitParL1") {
00699        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParL1)){
00700           hname = varName[pos]+id;
00701           hm->Fill1d(hname,nr->angclusterfit.fACluFitParL1,weight);
00702           } pos++; if(pos >= size) return;
00703      }
00704      if(varName[pos] == "angclusterfit.fACluFitParL2") {
00705        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParL2)){
00706           hname = varName[pos]+id;
00707           hm->Fill1d(hname,nr->angclusterfit.fACluFitParL2,weight);
00708           } pos++; if(pos >= size) return;
00709      }
00710      if(varName[pos] == "angclusterfit.fACluFitParC12") {
00711           if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParC12)){
00712           hname = varName[pos]+id;
00713           hm->Fill1d(hname,nr->angclusterfit.fACluFitParC12,weight);
00714           } pos++; if(pos >= size) return;
00715      }
00716      if(varName[pos] == "angclusterfit.fACluFitParTransE0") {
00717           if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitParTransE0)){
00718           hname = varName[pos]+id;
00719           hm->Fill1d(hname,nr->angclusterfit.fACluFitParTransE0,weight);
00720           } pos++; if(pos >= size) return;
00721      }if(varName[pos] == "angclusterfit.fACluFitTransChiSq") {
00722        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitTransChiSq)){
00723           hname = varName[pos]+id;
00724           hm->Fill1d(hname,nr->angclusterfit.fACluFitTransChiSq,weight);
00725           } pos++; if(pos >= size) return;
00726      }if(varName[pos] == "angclusterfit.fACluFitTransNDF") {
00727        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitTransNDF)){
00728           hname = varName[pos]+id;
00729           hm->Fill1d(hname,nr->angclusterfit.fACluFitTransNDF,weight);
00730           } pos++; if(pos >= size) return;
00731      }if(varName[pos] == "angclusterfit.fACluFitLongNDF") {
00732        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitLongNDF)){
00733           hname = varName[pos]+id;
00734           hm->Fill1d(hname,nr->angclusterfit.fACluFitLongNDF,weight);
00735           } pos++; if(pos >= size) return;
00736      }    
00737      if(varName[pos] == "angclusterfit.fACluFitMolRadPeak") {
00738        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitMolRadPeak)){
00739           hname = varName[pos]+id;
00740           hm->Fill1d(hname,nr->angclusterfit.fACluFitMolRadPeak,weight);
00741           } pos++; if(pos >= size) return;
00742      }if(varName[pos] == "angclusterfit.fACluFitMolRadVert") {
00743        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitMolRadVert)){
00744           hname = varName[pos]+id;
00745           hm->Fill1d(hname,nr->angclusterfit.fACluFitMolRadVert,weight);
00746           } pos++; if(pos >= size) return;     
00747      }if(varName[pos] == "angclusterfit.fACluFitMean") {
00748        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitMean)){
00749           hname = varName[pos]+id;
00750           hm->Fill1d(hname,nr->angclusterfit.fACluFitMean,weight);
00751           } pos++; if(pos >= size) return;
00752      }if(varName[pos] == "angclusterfit.fACluFitRMS") {
00753        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitRMS)){
00754           hname = varName[pos]+id;
00755           hm->Fill1d(hname,nr->angclusterfit.fACluFitRMS,weight);
00756           } pos++; if(pos >= size) return;
00757      }if(varName[pos] == "angclusterfit.fACluFitSkew") {
00758        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitSkew)){
00759           hname = varName[pos]+id;
00760           hm->Fill1d(hname,nr->angclusterfit.fACluFitSkew,weight);
00761           } pos++; if(pos >= size) return;
00762      }if(varName[pos] == "angclusterfit.fACluFitKurt") {
00763        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitKurt)){
00764           hname = varName[pos]+id;
00765           hm->Fill1d(hname,nr->angclusterfit.fACluFitKurt,weight);
00766           } pos++; if(pos >= size) return;
00767      }if(varName[pos] == "angclusterfit.fACluFitLongChiSq") {
00768        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitLongChiSq)){
00769           hname = varName[pos]+id;
00770           hm->Fill1d(hname,nr->angclusterfit.fACluFitLongChiSq,weight);
00771           } pos++; if(pos >= size) return;
00772      }if(varName[pos] == "angclusterfit.fACluFitLongConv") {
00773        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitLongConv)){
00774           hname = varName[pos]+id;
00775           hm->Fill1d(hname,nr->angclusterfit.fACluFitLongConv,weight);
00776           } pos++; if(pos >= size) return;
00777      }if(varName[pos] == "angclusterfit.fACluFitTransConv") {
00778        if(!ANtpDefVal::IsDefault(nr->angclusterfit.fACluFitTransConv)){
00779           hname = varName[pos]+id;
00780           hm->Fill1d(hname,nr->angclusterfit.fACluFitTransConv,weight);
00781           } pos++; if(pos >= size) return;
00782      }
00783 
00784 //end of ang
00785 //start of mst
00786 //     if(nr->mstvars.enn1 >3 && nr->mstvars.onn1>3){
00787            
00788      if(varName[pos] == "mstvars.enmsg") {
00789        if(!ANtpDefVal::IsDefault(nr->mstvars.enmsg)){
00790           hname = varName[pos]+id;
00791           hm->Fill1d(hname,nr->mstvars.enmsg,weight);
00792           } pos++; if(pos >= size) return;
00793      }if(varName[pos] == "mstvars.ew1") {
00794        if(!ANtpDefVal::IsDefault(nr->mstvars.ew1)){
00795           hname = varName[pos]+id;
00796           hm->Fill1d(hname,nr->mstvars.ew1,weight);
00797           } pos++; if(pos >= size) return;
00798      }if(varName[pos] == "mstvars.enn1") {
00799        if(!ANtpDefVal::IsDefault(nr->mstvars.enn1)){
00800           hname = varName[pos]+id;
00801           hm->Fill1d(hname,nr->mstvars.enn1,weight);
00802           } pos++; if(pos >= size) return;
00803      }if(varName[pos] == "mstvars.esm1") {
00804        if(!ANtpDefVal::IsDefault(nr->mstvars.esm1)){
00805           hname = varName[pos]+id;
00806           hm->Fill1d(hname,nr->mstvars.esm1,weight);
00807           } pos++; if(pos >= size) return;
00808      }if(varName[pos] == "mstvars.ewtot") {
00809        if(!ANtpDefVal::IsDefault(nr->mstvars.ewtot)){
00810           hname = varName[pos]+id;
00811           hm->Fill1d(hname,nr->mstvars.ewtot,weight);
00812           } pos++; if(pos >= size) return;
00813      }if(varName[pos] == "mstvars.enntot") {
00814        if(!ANtpDefVal::IsDefault(nr->mstvars.enntot)){
00815           hname = varName[pos]+id;
00816           hm->Fill1d(hname,nr->mstvars.enntot,weight);
00817           } pos++; if(pos >= size) return;
00818      }if(varName[pos] == "mstvars.esmtot") {
00819        if(!ANtpDefVal::IsDefault(nr->mstvars.esmtot)){
00820           hname = varName[pos]+id;
00821           hm->Fill1d(hname,nr->mstvars.esmtot,weight);
00822           } pos++; if(pos >= size) return;
00823      }if(varName[pos] == "mstvars.e4w") {
00824        if(!ANtpDefVal::IsDefault(nr->mstvars.e4w)){
00825           hname = varName[pos]+id;
00826           hm->Fill1d(hname,nr->mstvars.e4w,weight);
00827           } pos++; if(pos >= size) return;
00828      }if(varName[pos] == "mstvars.e4sm") {
00829        if(!ANtpDefVal::IsDefault(nr->mstvars.e4sm)){
00830           hname = varName[pos]+id;
00831           hm->Fill1d(hname,nr->mstvars.e4sm,weight);
00832           } pos++; if(pos >= size) return;
00833      }if(varName[pos] == "mstvars.e4nn") {
00834        if(!ANtpDefVal::IsDefault(nr->mstvars.e4nn)){
00835           hname = varName[pos]+id;
00836           hm->Fill1d(hname,nr->mstvars.e4nn,weight);
00837           } pos++; if(pos >= size) return;
00838      }if(varName[pos] == "mstvars.eb1") {
00839        if(!ANtpDefVal::IsDefault(nr->mstvars.eb1)){
00840           hname = varName[pos]+id;
00841           hm->Fill1d(hname,nr->mstvars.eb1,weight);
00842           } pos++; if(pos >= size) return;
00843      }if(varName[pos] == "mstvars.eb25") {
00844        if(!ANtpDefVal::IsDefault(nr->mstvars.eb25)){
00845           hname = varName[pos]+id;
00846           hm->Fill1d(hname,nr->mstvars.eb25,weight);
00847           } pos++; if(pos >= size) return;
00848      }if(varName[pos] == "mstvars.enbranch") {
00849        if(!ANtpDefVal::IsDefault(nr->mstvars.enbranch)){
00850           hname = varName[pos]+id;
00851           hm->Fill1d(hname,nr->mstvars.enbranch,weight);
00852           } pos++; if(pos >= size) return;
00853      }if(varName[pos] == "mstvars.onmsg") {
00854        if(!ANtpDefVal::IsDefault(nr->mstvars.onmsg)){
00855           hname = varName[pos]+id;
00856           hm->Fill1d(hname,nr->mstvars.onmsg,weight);
00857           } pos++; if(pos >= size) return;
00858      }if(varName[pos] == "mstvars.ow1") {
00859        if(!ANtpDefVal::IsDefault(nr->mstvars.ow1)){
00860           hname = varName[pos]+id;
00861           hm->Fill1d(hname,nr->mstvars.ow1,weight);
00862           } pos++; if(pos >= size) return;
00863      }if(varName[pos] == "mstvars.onn1") {
00864        if(!ANtpDefVal::IsDefault(nr->mstvars.onn1)){
00865           hname = varName[pos]+id;
00866           hm->Fill1d(hname,nr->mstvars.onn1,weight);
00867           } pos++; if(pos >= size) return;
00868      }if(varName[pos] == "mstvars.osm1") {
00869        if(!ANtpDefVal::IsDefault(nr->mstvars.osm1)){
00870           hname = varName[pos]+id;
00871           hm->Fill1d(hname,nr->mstvars.osm1,weight);
00872           } pos++; if(pos >= size) return;
00873      }if(varName[pos] == "mstvars.owtot") {
00874        if(!ANtpDefVal::IsDefault(nr->mstvars.owtot)){
00875           hname = varName[pos]+id;
00876           hm->Fill1d(hname,nr->mstvars.owtot,weight);
00877           } pos++; if(pos >= size) return;
00878      }if(varName[pos] == "mstvars.onntot") {
00879        if(!ANtpDefVal::IsDefault(nr->mstvars.onntot)){
00880           hname = varName[pos]+id;
00881           hm->Fill1d(hname,nr->mstvars.onntot,weight);
00882           } pos++; if(pos >= size) return;
00883      }
00884      if(varName[pos] == "mstvars.osmtot") {
00885        if(!ANtpDefVal::IsDefault(nr->mstvars.osmtot)){
00886           hname = varName[pos]+id;
00887           hm->Fill1d(hname,nr->mstvars.osmtot,weight);
00888           } pos++; if(pos >= size) return;
00889      }if(varName[pos] == "mstvars.o4w") {
00890        if(!ANtpDefVal::IsDefault(nr->mstvars.o4w)){
00891           hname = varName[pos]+id;
00892           hm->Fill1d(hname,nr->mstvars.o4w,weight);
00893           } pos++; if(pos >= size) return;
00894      }if(varName[pos] == "mstvars.o4sm") {
00895        if(!ANtpDefVal::IsDefault(nr->mstvars.o4sm)){
00896           hname = varName[pos]+id;
00897           hm->Fill1d(hname,nr->mstvars.o4sm,weight);
00898           } pos++; if(pos >= size) return;
00899      }if(varName[pos] == "mstvars.o4nn") {
00900        if(!ANtpDefVal::IsDefault(nr->mstvars.o4nn)){
00901           hname = varName[pos]+id;
00902           hm->Fill1d(hname,nr->mstvars.o4nn,weight);
00903           } pos++; if(pos >= size) return;
00904      }if(varName[pos] == "mstvars.ob1") {
00905        if(!ANtpDefVal::IsDefault(nr->mstvars.ob1)){
00906           hname = varName[pos]+id;
00907           hm->Fill1d(hname,nr->mstvars.ob1,weight);
00908           } pos++; if(pos >= size) return;
00909      }
00910      if(varName[pos] == "mstvars.ob25") {
00911        if(!ANtpDefVal::IsDefault(nr->mstvars.ob25)){
00912           hname = varName[pos]+id;
00913           hm->Fill1d(hname,nr->mstvars.ob25,weight);
00914           } pos++; if(pos >= size) return;
00915      }if(varName[pos] == "mstvars.onbranch") {
00916        if(!ANtpDefVal::IsDefault(nr->mstvars.onbranch)){
00917           hname = varName[pos]+id;
00918           hm->Fill1d(hname,nr->mstvars.onbranch,weight);
00919           } pos++; if(pos >= size) return;
00920      }if(varName[pos] == "mstvars.eallw1") {
00921         for(int i=0;i<nr->mstvars.enn1;i++){
00922           hname = varName[pos]+id;
00923           hm->Fill1d(hname,nr->mstvars.eallw1[i],weight);           
00924         }
00925         pos++;          
00926        if(pos >= size) return;
00927      }if(varName[pos] == "mstvars.oallw1") {
00928         for(int i=0;i<nr->mstvars.onn1;i++){
00929           hname = varName[pos]+id;
00930           hm->Fill1d(hname,nr->mstvars.oallw1[i],weight); 
00931         }
00932         pos++;       if(pos >= size) return;
00933      }if(varName[pos] == "mstvars.eallm1") {
00934         for(int i=0;i<nr->mstvars.enn1;i++){
00935           hname = varName[pos]+id;
00936           hm->Fill1d(hname,nr->mstvars.eallm1[i],weight);
00937         }
00938         pos++;          if(pos >= size) return;
00939      }if(varName[pos] == "mstvars.oallm1") {
00940         for(int i=0;i<nr->mstvars.onn1;i++){
00941           hname = varName[pos]+id;
00942           hm->Fill1d(hname,nr->mstvars.oallm1[i],weight); 
00943         }
00944         pos++;          if(pos >= size) return;
00945      }if(varName[pos] == "mstvars.eeprob") {
00946        if(!ANtpDefVal::IsDefault(nr->mstvars.eeprob)){
00947           hname = varName[pos]+id;
00948           hm->Fill1d(hname,nr->mstvars.eeprob,weight);
00949           } pos++; if(pos >= size) return;
00950      }if(varName[pos] == "mstvars.oeprob") {
00951        if(!ANtpDefVal::IsDefault(nr->mstvars.oeprob)){
00952           hname = varName[pos]+id;
00953           hm->Fill1d(hname,nr->mstvars.oeprob,weight);
00954           } pos++; if(pos >= size) return;
00955      }if(varName[pos] == "mstvars.ealpha") {
00956        if(!ANtpDefVal::IsDefault(nr->mstvars.ealpha)){
00957           hname = varName[pos]+id;
00958           hm->Fill1d(hname,nr->mstvars.ealpha,weight);
00959           } pos++; if(pos >= size) return;
00960      }if(varName[pos] == "mstvars.oalpha") {
00961        if(!ANtpDefVal::IsDefault(nr->mstvars.oalpha)){
00962           hname = varName[pos]+id;
00963           hm->Fill1d(hname,nr->mstvars.oalpha,weight);
00964           } pos++; if(pos >= size) return;
00965      }if(varName[pos] == "mstvars.ebeta") {
00966        if(!ANtpDefVal::IsDefault(nr->mstvars.ebeta)){
00967           hname = varName[pos]+id;
00968           hm->Fill1d(hname,nr->mstvars.ebeta,weight);
00969           } pos++; if(pos >= size) return;
00970      }if(varName[pos] == "mstvars.obeta") {
00971        if(!ANtpDefVal::IsDefault(nr->mstvars.obeta)){
00972           hname = varName[pos]+id;
00973           hm->Fill1d(hname,nr->mstvars.obeta,weight);
00974           } pos++; if(pos >= size) return;
00975      }
00976 //     }
00977 //end of mst vars
00978 //start of fracvars
00979 
00980      if(varName[pos] == "fracvars.fract_1_plane") {
00981        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_1_plane)){
00982           hname = varName[pos]+id;
00983           hm->Fill1d(hname,nr->fracvars.fract_1_plane,weight);
00984           } pos++; if(pos >= size) return;
00985      }if(varName[pos] == "fracvars.fract_2_planes") {
00986        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_2_planes)){
00987           hname = varName[pos]+id;
00988           hm->Fill1d(hname,nr->fracvars.fract_2_planes,weight);
00989           } pos++; if(pos >= size) return;
00990      }if(varName[pos] == "fracvars.fract_3_planes") {
00991        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_3_planes)){
00992           hname = varName[pos]+id;
00993           hm->Fill1d(hname,nr->fracvars.fract_3_planes,weight);
00994           } pos++; if(pos >= size) return;
00995      }if(varName[pos] == "fracvars.fract_4_planes") {
00996        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_4_planes)){
00997           hname = varName[pos]+id;
00998           hm->Fill1d(hname,nr->fracvars.fract_4_planes,weight);
00999           } pos++; if(pos >= size) return;
01000      }if(varName[pos] == "fracvars.fract_5_planes") {
01001        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_5_planes)){
01002           hname = varName[pos]+id;
01003           hm->Fill1d(hname,nr->fracvars.fract_5_planes,weight);
01004           } pos++; if(pos >= size) return;
01005      }if(varName[pos] == "fracvars.fract_6_planes") {
01006        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_6_planes)){
01007           hname = varName[pos]+id;
01008           hm->Fill1d(hname,nr->fracvars.fract_6_planes,weight);
01009           } pos++; if(pos >= size) return;
01010      }if(varName[pos] == "fracvars.fract_2_counters") {
01011        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_2_counters)){
01012           hname = varName[pos]+id;
01013           hm->Fill1d(hname,nr->fracvars.fract_2_counters,weight);
01014           } pos++; if(pos >= size) return;
01015      }if(varName[pos] == "fracvars.fract_4_counters") {
01016        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_4_counters)){
01017           hname = varName[pos]+id;
01018           hm->Fill1d(hname,nr->fracvars.fract_4_counters,weight);
01019           } pos++; if(pos >= size) return;
01020      }if(varName[pos] == "fracvars.fract_6_counters") {
01021        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_6_counters)){
01022           hname = varName[pos]+id;
01023           hm->Fill1d(hname,nr->fracvars.fract_6_counters,weight);
01024           } pos++; if(pos >= size) return;
01025      }if(varName[pos] == "fracvars.fract_8_counters") {
01026        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_8_counters)){
01027           hname = varName[pos]+id;
01028           hm->Fill1d(hname,nr->fracvars.fract_8_counters,weight);
01029           } pos++; if(pos >= size) return;
01030      }if(varName[pos] == "fracvars.fract_10_counters") {
01031        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_10_counters)){
01032           hname = varName[pos]+id;
01033           hm->Fill1d(hname,nr->fracvars.fract_10_counters,weight);
01034           } pos++; if(pos >= size) return;
01035      }if(varName[pos] == "fracvars.fract_12_counters") {
01036        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_12_counters)){
01037           hname = varName[pos]+id;
01038           hm->Fill1d(hname,nr->fracvars.fract_12_counters,weight);
01039           } pos++; if(pos >= size) return;
01040      }if(varName[pos] == "fracvars.fract_road") {
01041        if(!ANtpDefVal::IsDefault(nr->fracvars.fract_road)){
01042           hname = varName[pos]+id;
01043           hm->Fill1d(hname,nr->fracvars.fract_road,weight);
01044           } pos++; if(pos >= size) return;
01045      }if(varName[pos] == "fracvars.shw_max") {
01046        if(!ANtpDefVal::IsDefault(nr->fracvars.shw_max)){
01047           hname = varName[pos]+id;
01048           hm->Fill1d(hname,nr->fracvars.shw_max,weight);
01049           } pos++; if(pos >= size) return;
01050      }if(varName[pos] == "fracvars.shw_nstp") {
01051        if(!ANtpDefVal::IsDefault(nr->fracvars.shw_nstp)){
01052           hname = varName[pos]+id;
01053           hm->Fill1d(hname,nr->fracvars.shw_nstp,weight);
01054           } pos++; if(pos >= size) return;
01055      }if(varName[pos] == "fracvars.shw_npl") {
01056        if(!ANtpDefVal::IsDefault(nr->fracvars.shw_npl)){
01057           hname = varName[pos]+id;
01058           hm->Fill1d(hname,nr->fracvars.shw_npl,weight);
01059           } pos++; if(pos >= size) return;
01060      }if(varName[pos] == "fracvars.pid") {
01061        if(!ANtpDefVal::IsDefault(nr->fracvars.pid)){
01062           hname = varName[pos]+id;
01063           hm->Fill1d(hname,nr->fracvars.pid,weight);
01064           } pos++; if(pos >= size) return;
01065      }
01066 
01067 
01068 //end of fracvar
01069 //start of anainfo
01070 
01071      if(varName[pos] == "anainfo.inFiducialVolume") {
01072        if(!ANtpDefVal::IsDefault(nr->anainfo.inFiducialVolume)){
01073           hname = varName[pos]+id;
01074           hm->Fill1d(hname,nr->anainfo.inFiducialVolume,weight);
01075           } pos++; if(pos >= size) return;
01076      }if(varName[pos] == "anainfo.isFullyContained") {
01077        if(!ANtpDefVal::IsDefault(nr->anainfo.isFullyContained)){
01078           hname = varName[pos]+id;
01079           hm->Fill1d(hname,nr->anainfo.isFullyContained,weight);
01080           } pos++; if(pos >= size) return;
01081 /*     }if(varName[pos] == "anainfo.passesCuts") {
01082        if(!ANtpDefVal::IsDefault(nr->anainfo.passesCuts)){
01083           hname = varName[pos]+id;
01084           hm->Fill1d(hname,nr->anainfo.passesCuts,weight);
01085           } pos++; if(pos >= size) return;
01086      }if(varName[pos] == "anainfo.pass") {
01087        if(!ANtpDefVal::IsDefault(nr->anainfo.pass)){
01088           hname = varName[pos]+id;
01089           hm->Fill1d(hname,nr->anainfo.pass,weight);
01090           } pos++; if(pos >= size) return;
01091 //     }if(varName[pos] == "anainfo.isNC") {
01092 //       if(!ANtpDefVal::IsDefault(nr->anainfo.isNC)){
01093 //          hname = varName[pos]+id;
01094 //          hm->Fill1d(hname,nr->anainfo.isNC,weight);
01095 //          } pos++; if(pos >= size) return;
01096 //     }if(varName[pos] == "anainfo.isCC") {
01097 //       if(!ANtpDefVal::IsDefault(nr->anainfo.isCC)){
01098 //          hname = varName[pos]+id;
01099 //          hm->Fill1d(hname,nr->anainfo.isCC,weight);
01100 //          } pos++; if(pos >= size) return;
01101 //     }if(varName[pos] == "anainfo.separationParameterCut") {
01102 //       if(!ANtpDefVal::IsDefault(nr->anainfo.separationParameterCut)){
01103 //          hname = varName[pos]+id;
01104 //          hm->Fill1d(hname,nr->anainfo.separationParameterCut,weight);
01105 //          } pos++; if(pos >= size) return;
01106 //     }if(varName[pos] == "anainfo.separationParameter") {
01107 //       if(!ANtpDefVal::IsDefault(nr->anainfo.separationParameter)){
01108 //          hname = varName[pos]+id;
01109 //          hm->Fill1d(hname,nr->anainfo.separationParameter,weight);
01110 //          } pos++; if(pos >= size) return;
01111      }if(varName[pos] == "anainfo.recoNuEnergy") {
01112        if(!ANtpDefVal::IsDefault(nr->anainfo.recoNuEnergy)){
01113           hname = varName[pos]+id;
01114           hm->Fill1d(hname,nr->anainfo.recoNuEnergy,weight);
01115           } pos++; if(pos >= size) return;
01116      }if(varName[pos] == "anainfo.recoMuEnergy") {
01117        if(!ANtpDefVal::IsDefault(nr->anainfo.recoMuEnergy)){
01118           hname = varName[pos]+id;
01119           hm->Fill1d(hname,nr->anainfo.recoMuEnergy,weight);
01120           } pos++; if(pos >= size) return;
01121      }if(varName[pos] == "anainfo.recoShowerEnergy") {
01122        if(!ANtpDefVal::IsDefault(nr->anainfo.recoShowerEnergy)){
01123           hname = varName[pos]+id;
01124           hm->Fill1d(hname,nr->anainfo.recoShowerEnergy,weight);
01125           } pos++; if(pos >= size) return;
01126      }if(varName[pos] == "anainfo.recoQENuEnergy") {
01127        if(!ANtpDefVal::IsDefault(nr->anainfo.recoQENuEnergy)){
01128           hname = varName[pos]+id;
01129           hm->Fill1d(hname,nr->anainfo.recoQENuEnergy,weight);
01130           } pos++; if(pos >= size) return;
01131      }if(varName[pos] == "anainfo.recoQEQ2") {
01132        if(!ANtpDefVal::IsDefault(nr->anainfo.recoQEQ2)){
01133           hname = varName[pos]+id;
01134           hm->Fill1d(hname,nr->anainfo.recoQEQ2,weight);
01135           } pos++; if(pos >= size) return;
01136      }if(varName[pos] == "anainfo.recoHadronicY") {
01137        if(!ANtpDefVal::IsDefault(nr->anainfo.recoHadronicY)){
01138           hname = varName[pos]+id;
01139           hm->Fill1d(hname,nr->anainfo.recoHadronicY,weight);
01140           } pos++; if(pos >= size) return;
01141      }if(varName[pos] == "anainfo.recoNuDCos") {
01142        if(!ANtpDefVal::IsDefault(nr->anainfo.recoNuDCos)){
01143           hname = varName[pos]+id;
01144           hm->Fill1d(hname,nr->anainfo.recoNuDCos,weight);
01145           } pos++; if(pos >= size) return;
01146      }if(varName[pos] == "anainfo.recoMuDCosZVtx") {
01147        if(!ANtpDefVal::IsDefault(nr->anainfo.recoMuDCosZVtx)){
01148           hname = varName[pos]+id;
01149           hm->Fill1d(hname,nr->anainfo.recoMuDCosZVtx,weight);
01150           } pos++; if(pos >= size) return;
01151      }if(varName[pos] == "anainfo.recoVtxX") {
01152        if(!ANtpDefVal::IsDefault(nr->anainfo.recoVtxX)){
01153           hname = varName[pos]+id;
01154           hm->Fill1d(hname,nr->anainfo.recoVtxX,weight);
01155           } pos++; if(pos >= size) return;
01156      }if(varName[pos] == "anainfo.recoVtxY") {
01157        if(!ANtpDefVal::IsDefault(nr->anainfo.recoVtxY)){
01158           hname = varName[pos]+id;
01159           hm->Fill1d(hname,nr->anainfo.recoVtxY,weight);
01160           } pos++; if(pos >= size) return;
01161      }if(varName[pos] == "anainfo.recoVtxZ") {
01162        if(!ANtpDefVal::IsDefault(nr->anainfo.recoVtxZ)){
01163           hname = varName[pos]+id;
01164           hm->Fill1d(hname,nr->anainfo.recoVtxZ,weight);
01165           } pos++; if(pos >= size) return;
01166      }if(varName[pos] == "anainfo.recoEventLength") {
01167        if(!ANtpDefVal::IsDefault(nr->anainfo.recoEventLength)){
01168           hname = varName[pos]+id;
01169           hm->Fill1d(hname,nr->anainfo.recoEventLength,weight);
01170           } pos++; if(pos >= size) return;
01171      }if(varName[pos] == "anainfo.recoTrackLength") {
01172        if(!ANtpDefVal::IsDefault(nr->anainfo.recoTrackLength)){
01173           hname = varName[pos]+id;
01174           hm->Fill1d(hname,nr->anainfo.recoTrackLength,weight);
01175           } pos++; if(pos >= size) return;
01176      }if(varName[pos] == "anainfo.recoTrackMomentum") {
01177        if(!ANtpDefVal::IsDefault(nr->anainfo.recoTrackMomentum)){
01178           hname = varName[pos]+id;
01179           hm->Fill1d(hname,nr->anainfo.recoTrackMomentum,weight);
01180           } pos++; if(pos >= size) return;
01181      }if(varName[pos] == "anainfo.recoTrackRange") {
01182        if(!ANtpDefVal::IsDefault(nr->anainfo.recoTrackRange)){
01183           hname = varName[pos]+id;
01184           hm->Fill1d(hname,nr->anainfo.recoTrackRange,weight);
01185           } pos++; if(pos >= size) return;
01186      }if(varName[pos] == "anainfo.recoSigmaQoverP") {
01187        if(!ANtpDefVal::IsDefault(nr->anainfo.recoSigmaQoverP)){
01188           hname = varName[pos]+id;
01189           hm->Fill1d(hname,nr->anainfo.recoSigmaQoverP,weight);
01190           } pos++; if(pos >= size) return;
01191   */   }
01192 
01193 //end of anainfo
01194 //start of srevent
01195 //     cout<<varName[pos]<<"  "<<pos<<endl;
01196 
01197      if(varName[pos] == "srevent.event") {
01198        if(!ANtpDefVal::IsDefault(nr->srevent.index)){
01199           hname = varName[pos]+id;
01200           hm->Fill1d(hname,nr->srevent.index,weight);
01201           } pos++; if(pos >= size) return;
01202      }if(varName[pos] == "srevent.pulseHeight") {
01203        if(!ANtpDefVal::IsDefault(nr->srevent.pulseHeight)){
01204           hname = varName[pos]+id;
01205           hm->Fill1d(hname,nr->srevent.pulseHeight,weight);
01206           } pos++; if(pos >= size) return;
01207      }if(varName[pos] == "srevent.energyGeV") {
01208        if(!ANtpDefVal::IsDefault(nr->srevent.energyGeV)){
01209           hname = varName[pos]+id;
01210           hm->Fill1d(hname,nr->srevent.energyGeV,weight);
01211           } pos++; if(pos >= size) return;
01212      }if(varName[pos] == "srevent.begPlane") {
01213        if(!ANtpDefVal::IsDefault(nr->srevent.begPlane)){
01214           hname = varName[pos]+id;
01215           hm->Fill1d(hname,nr->srevent.begPlane,weight);
01216           } pos++; if(pos >= size) return;
01217      }if(varName[pos] == "srevent.endPlane") {
01218        if(!ANtpDefVal::IsDefault(nr->srevent.endPlane)){
01219           hname = varName[pos]+id;
01220           hm->Fill1d(hname,nr->srevent.endPlane,weight);
01221           } pos++; if(pos >= size) return;
01222      }if(varName[pos] == "srevent.planes") {
01223        if(!ANtpDefVal::IsDefault(nr->srevent.planes)){
01224           hname = varName[pos]+id;
01225           hm->Fill1d(hname,nr->srevent.planes,weight);
01226           } pos++; if(pos >= size) return;
01227      }if(varName[pos] == "srevent.totalStrips") {
01228        if(!ANtpDefVal::IsDefault(nr->srevent.totalStrips)){
01229           hname = varName[pos]+id;
01230           hm->Fill1d(hname,nr->srevent.totalStrips,weight);
01231           } pos++; if(pos >= size) return;
01232      }if(varName[pos] == "srevent.passStrips") {
01233        if(!ANtpDefVal::IsDefault(nr->srevent.passStrips)){
01234           hname = varName[pos]+id;
01235           hm->Fill1d(hname,nr->srevent.passStrips,weight);
01236           } pos++; if(pos >= size) return;
01237      }if(varName[pos] == "srevent.showers") {
01238        if(!ANtpDefVal::IsDefault(nr->srevent.showers)){
01239           hname = varName[pos]+id;
01240           hm->Fill1d(hname,nr->srevent.showers,weight);
01241           } pos++; if(pos >= size) return;
01242      }if(varName[pos] == "srevent.tracks") {
01243        if(!ANtpDefVal::IsDefault(nr->srevent.tracks)){
01244           hname = varName[pos]+id;
01245           hm->Fill1d(hname,nr->srevent.tracks,weight);
01246           } pos++; if(pos >= size) return;
01247      }if(varName[pos] == "srevent.vtxX") {
01248        if(!ANtpDefVal::IsDefault(nr->srevent.vtxX)){
01249           hname = varName[pos]+id;
01250           hm->Fill1d(hname,nr->srevent.vtxX,weight);
01251           } pos++; if(pos >= size) return;
01252      }if(varName[pos] == "srevent.vtxY") {
01253        if(!ANtpDefVal::IsDefault(nr->srevent.vtxY)){
01254           hname = varName[pos]+id;
01255           hm->Fill1d(hname,nr->srevent.vtxY,weight);
01256           } pos++; if(pos >= size) return;
01257      }if(varName[pos] == "srevent.vtxZ") {
01258        if(!ANtpDefVal::IsDefault(nr->srevent.vtxZ)){
01259           hname = varName[pos]+id;
01260           hm->Fill1d(hname,nr->srevent.vtxZ,weight);
01261           } pos++; if(pos >= size) return;
01262      }if(varName[pos] == "srevent.timeLength") {
01263        if(!ANtpDefVal::IsDefault(nr->srevent.timeLength)){
01264           hname = varName[pos]+id;
01265           hm->Fill1d(hname,nr->srevent.timeLength,weight);
01266           } pos++; if(pos >= size) return;
01267      }if(varName[pos] == "srevent.phMeu") {
01268        if(!ANtpDefVal::IsDefault(nr->srevent.phMeu)){
01269           hname = varName[pos]+id;
01270           hm->Fill1d(hname,nr->srevent.phMeu,weight);
01271         } pos++; if(pos >= size) return;
01272      }if(varName[pos] == "srevent.phNueGeV") {
01273         if(!ANtpDefVal::IsDefault(nr->srevent.phNueGeV)){
01274            hname = varName[pos]+id;
01275            hm->Fill1d(hname,nr->srevent.phNueGeV,weight);
01276         } pos++; if(pos >= size) return;
01277      }if(varName[pos] == "srevent.triggerPass") {
01278         if(!ANtpDefVal::IsDefault(nr->srevent.triggerPass)){
01279            hname = varName[pos]+id;
01280            hm->Fill1d(hname,nr->srevent.triggerPass,weight);
01281         } pos++; if(pos >= size) return;
01282      }
01283      
01284 
01285 //end of srevent
01286 //start of srshw
01287 
01288      if(varName[pos] == "srshower.planes") {
01289        if(!ANtpDefVal::IsDefault(nr->srshower.planes)){
01290           hname = varName[pos]+id;
01291           hm->Fill1d(hname,nr->srshower.planes,weight);
01292           } pos++; if(pos >= size) return;
01293      }if(varName[pos] == "srshower.totalStrips") {
01294        if(!ANtpDefVal::IsDefault(nr->srshower.totalStrips)){
01295           hname = varName[pos]+id;
01296           hm->Fill1d(hname,nr->srshower.totalStrips,weight);
01297           } pos++; if(pos >= size) return;
01298      }if(varName[pos] == "srshower.begPlane") {
01299        if(!ANtpDefVal::IsDefault(nr->srshower.begPlane)){
01300           hname = varName[pos]+id;
01301           hm->Fill1d(hname,nr->srshower.begPlane,weight);
01302           } pos++; if(pos >= size) return;
01303      }if(varName[pos] == "srshower.endPlane") {
01304        if(!ANtpDefVal::IsDefault(nr->srshower.endPlane)){
01305           hname = varName[pos]+id;
01306           hm->Fill1d(hname,nr->srshower.endPlane,weight);
01307           } pos++; if(pos >= size) return;
01308      }if(varName[pos] == "srshower.vtxX") {
01309        if(!ANtpDefVal::IsDefault(nr->srshower.vtxX)){
01310           hname = varName[pos]+id;
01311           hm->Fill1d(hname,nr->srshower.vtxX,weight);
01312           } pos++; if(pos >= size) return;
01313      }if(varName[pos] == "srshower.vtxY") {
01314        if(!ANtpDefVal::IsDefault(nr->srshower.vtxY)){
01315           hname = varName[pos]+id;
01316           hm->Fill1d(hname,nr->srshower.vtxY,weight);
01317           } pos++; if(pos >= size) return;
01318      }if(varName[pos] == "srshower.vtxZ") {
01319        if(!ANtpDefVal::IsDefault(nr->srshower.vtxZ)){
01320           hname = varName[pos]+id;
01321           hm->Fill1d(hname,nr->srshower.vtxZ,weight);
01322           } pos++; if(pos >= size) return;
01323      }if(varName[pos] == "srshower.dcosX") {
01324        if(!ANtpDefVal::IsDefault(nr->srshower.dcosX)){
01325           hname = varName[pos]+id;
01326           hm->Fill1d(hname,nr->srshower.dcosX,weight);
01327           } pos++; if(pos >= size) return;
01328      }if(varName[pos] == "srshower.dcosY") {
01329        if(!ANtpDefVal::IsDefault(nr->srshower.dcosY)){
01330           hname = varName[pos]+id;
01331           hm->Fill1d(hname,nr->srshower.dcosY,weight);
01332           } pos++; if(pos >= size) return;
01333      }if(varName[pos] == "srshower.dcosZ") {
01334        if(!ANtpDefVal::IsDefault(nr->srshower.dcosZ)){
01335           hname = varName[pos]+id;
01336           hm->Fill1d(hname,nr->srshower.dcosZ,weight);
01337           } pos++; if(pos >= size) return;
01338      }if(varName[pos] == "srshower.pulseHeight") {
01339        if(!ANtpDefVal::IsDefault(nr->srshower.pulseHeight)){
01340           hname = varName[pos]+id;
01341           hm->Fill1d(hname,nr->srshower.pulseHeight,weight);
01342           } pos++; if(pos >= size) return;
01343      }if(varName[pos] == "srshower.stripRatio") {
01344        if(!ANtpDefVal::IsDefault(nr->srshower.stripRatio)){
01345           hname = varName[pos]+id;
01346           hm->Fill1d(hname,nr->srshower.stripRatio,weight);
01347           } pos++; if(pos >= size) return;
01348      }if(varName[pos] == "srshower.planeRatio") {
01349        if(!ANtpDefVal::IsDefault(nr->srshower.planeRatio)){
01350           hname = varName[pos]+id;
01351           hm->Fill1d(hname,nr->srshower.planeRatio,weight);
01352           } pos++; if(pos >= size) return;
01353      }if(varName[pos] == "srshower.pulseHeightRatio") {
01354        if(!ANtpDefVal::IsDefault(nr->srshower.pulseHeightRatio)){
01355           hname = varName[pos]+id;
01356           hm->Fill1d(hname,nr->srshower.pulseHeightRatio,weight);
01357           } pos++; if(pos >= size) return;
01358      }
01359 
01360 //end of srshower
01361 
01362 //start of srtrack
01363 if(varName[pos] == "srtrack.planes") {
01364        if(!ANtpDefVal::IsDefault(nr->srtrack.planes)){
01365           hname = varName[pos]+id;
01366           hm->Fill1d(hname,nr->srtrack.planes,weight);
01367           } pos++; if(pos >= size) return;
01368      }if(varName[pos] == "srtrack.totalStrips") {
01369        if(!ANtpDefVal::IsDefault(nr->srtrack.totalStrips)){
01370           hname = varName[pos]+id;
01371           hm->Fill1d(hname,nr->srtrack.totalStrips,weight);
01372           } pos++; if(pos >= size) return;
01373      }if(varName[pos] == "srtrack.pulseHeight") {
01374        if(!ANtpDefVal::IsDefault(nr->srtrack.pulseHeight)){
01375           hname = varName[pos]+id;
01376           hm->Fill1d(hname,nr->srtrack.pulseHeight,weight);
01377           } pos++; if(pos >= size) return;
01378      }if(varName[pos] == "srtrack.fitMomentum") {
01379        if(!ANtpDefVal::IsDefault(nr->srtrack.fitMomentum)){
01380           hname = varName[pos]+id;
01381           hm->Fill1d(hname,nr->srtrack.fitMomentum,weight);
01382           } pos++; if(pos >= size) return;
01383      }if(varName[pos] == "srtrack.rangeMomentum") {
01384        if(!ANtpDefVal::IsDefault(nr->srtrack.rangeMomentum)){
01385           hname = varName[pos]+id;
01386           hm->Fill1d(hname,nr->srtrack.rangeMomentum,weight);
01387           } pos++; if(pos >= size) return;
01388      }if(varName[pos] == "srtrack.sigmaQoverP") {
01389        if(!ANtpDefVal::IsDefault(nr->srtrack.sigmaQoverP)){
01390           hname = varName[pos]+id;
01391           hm->Fill1d(hname,nr->srtrack.sigmaQoverP,weight);
01392           } pos++; if(pos >= size) return;
01393      }if(varName[pos] == "srtrack.begPlane") {
01394        if(!ANtpDefVal::IsDefault(nr->srtrack.begPlane)){
01395           hname = varName[pos]+id;
01396           hm->Fill1d(hname,nr->srtrack.begPlane,weight);
01397           } pos++; if(pos >= size) return;
01398      }if(varName[pos] == "srtrack.endPlane") {
01399        if(!ANtpDefVal::IsDefault(nr->srtrack.endPlane)){
01400           hname = varName[pos]+id;
01401           hm->Fill1d(hname,nr->srtrack.endPlane,weight);
01402           } pos++; if(pos >= size) return;
01403      }if(varName[pos] == "srtrack.length") {
01404        if(!ANtpDefVal::IsDefault(nr->srtrack.length)){
01405           hname = varName[pos]+id;
01406           hm->Fill1d(hname,nr->srtrack.length,weight);
01407           } pos++; if(pos >= size) return;
01408      }if(varName[pos] == "srtrack.vtxX") {
01409        if(!ANtpDefVal::IsDefault(nr->srtrack.vtxX)){
01410           hname = varName[pos]+id;
01411           hm->Fill1d(hname,nr->srtrack.vtxX,weight);
01412           } pos++; if(pos >= size) return;
01413      }if(varName[pos] == "srtrack.vtxY") {
01414        if(!ANtpDefVal::IsDefault(nr->srtrack.vtxY)){
01415           hname = varName[pos]+id;
01416           hm->Fill1d(hname,nr->srtrack.vtxY,weight);
01417           } pos++; if(pos >= size) return;
01418      }if(varName[pos] == "srtrack.vtxZ") {
01419        if(!ANtpDefVal::IsDefault(nr->srtrack.vtxZ)){
01420           hname = varName[pos]+id;
01421           hm->Fill1d(hname,nr->srtrack.vtxZ,weight);
01422           } pos++; if(pos >= size) return;
01423      }if(varName[pos] == "srtrack.dcosXVtx") {
01424        if(!ANtpDefVal::IsDefault(nr->srtrack.dcosXVtx)){
01425           hname = varName[pos]+id;
01426           hm->Fill1d(hname,nr->srtrack.dcosXVtx,weight);
01427           } pos++; if(pos >= size) return;
01428      }if(varName[pos] == "srtrack.dcosYVtx") {
01429        if(!ANtpDefVal::IsDefault(nr->srtrack.dcosYVtx)){
01430           hname = varName[pos]+id;
01431           hm->Fill1d(hname,nr->srtrack.dcosYVtx,weight);
01432           } pos++; if(pos >= size) return;
01433      }if(varName[pos] == "srtrack.dcosZVtx") {
01434        if(!ANtpDefVal::IsDefault(nr->srtrack.dcosZVtx)){
01435           hname = varName[pos]+id;
01436           hm->Fill1d(hname,nr->srtrack.dcosZVtx,weight);
01437           } pos++; if(pos >= size) return;
01438      }if(varName[pos] == "srtrack.endX") {
01439        if(!ANtpDefVal::IsDefault(nr->srtrack.endX)){
01440           hname = varName[pos]+id;
01441           hm->Fill1d(hname,nr->srtrack.endX,weight);
01442           } pos++; if(pos >= size) return;
01443      }if(varName[pos] == "srtrack.endY") {
01444        if(!ANtpDefVal::IsDefault(nr->srtrack.endY)){
01445           hname = varName[pos]+id;
01446           hm->Fill1d(hname,nr->srtrack.endY,weight);
01447           } pos++; if(pos >= size) return;
01448      }if(varName[pos] == "srtrack.endZ") {
01449        if(!ANtpDefVal::IsDefault(nr->srtrack.endZ)){
01450           hname = varName[pos]+id;
01451           hm->Fill1d(hname,nr->srtrack.endZ,weight);
01452           } pos++; if(pos >= size) return;
01453      }if(varName[pos] == "srtrack.dcosXEnd") {
01454        if(!ANtpDefVal::IsDefault(nr->srtrack.dcosXEnd)){
01455           hname = varName[pos]+id;
01456           hm->Fill1d(hname,nr->srtrack.dcosXEnd,weight);
01457           } pos++; if(pos >= size) return;
01458      }if(varName[pos] == "srtrack.dcosYEnd") {
01459        if(!ANtpDefVal::IsDefault(nr->srtrack.dcosYEnd)){
01460           hname = varName[pos]+id;
01461           hm->Fill1d(hname,nr->srtrack.dcosYEnd,weight);
01462           } pos++; if(pos >= size) return;
01463      }if(varName[pos] == "srtrack.dcosZEnd") {
01464        if(!ANtpDefVal::IsDefault(nr->srtrack.dcosZEnd)){
01465           hname = varName[pos]+id;
01466           hm->Fill1d(hname,nr->srtrack.dcosZEnd,weight);
01467           } pos++; if(pos >= size) return;
01468      }if(varName[pos] == "srtrack.reducedChi2") {
01469        if(!ANtpDefVal::IsDefault(nr->srtrack.reducedChi2)){
01470           hname = varName[pos]+id;
01471           hm->Fill1d(hname,nr->srtrack.reducedChi2,weight);
01472           } pos++; if(pos >= size) return;
01473      }if(varName[pos] == "srtrack.passedFit") {
01474        if(!ANtpDefVal::IsDefault(nr->srtrack.passedFit)){
01475           hname = varName[pos]+id;
01476           hm->Fill1d(hname,nr->srtrack.passedFit,weight);
01477           } pos++; if(pos >= size) return;
01478      }if(varName[pos] == "srtrack.traceVtx") {
01479        if(!ANtpDefVal::IsDefault(nr->srtrack.traceVtx)){
01480           hname = varName[pos]+id;
01481           hm->Fill1d(hname,nr->srtrack.traceVtx,weight);
01482           } pos++; if(pos >= size) return;
01483      }if(varName[pos] == "srtrack.traceVtxZ") {
01484        if(!ANtpDefVal::IsDefault(nr->srtrack.traceVtxZ)){
01485           hname = varName[pos]+id;
01486           hm->Fill1d(hname,nr->srtrack.traceVtxZ,weight);
01487           } pos++; if(pos >= size) return;
01488      }if(varName[pos] == "srtrack.traceEnd") {
01489        if(!ANtpDefVal::IsDefault(nr->srtrack.traceEnd)){
01490           hname = varName[pos]+id;
01491           hm->Fill1d(hname,nr->srtrack.traceEnd,weight);
01492           } pos++; if(pos >= size) return;
01493      }if(varName[pos] == "srtrack.traceEndZ") {
01494        if(!ANtpDefVal::IsDefault(nr->srtrack.traceEndZ)){
01495           hname = varName[pos]+id;
01496           hm->Fill1d(hname,nr->srtrack.traceEndZ,weight);
01497           } pos++; if(pos >= size) return;
01498      }if(varName[pos] == "srtrack.trklikePlanes") {
01499        if(!ANtpDefVal::IsDefault(nr->srtrack.trklikePlanes)){
01500           hname = varName[pos]+id;
01501           hm->Fill1d(hname,nr->srtrack.trklikePlanes,weight);
01502           } pos++; if(pos >= size) return;
01503      }if(varName[pos] == "srtrack.trklikeRatio") {
01504        if(!ANtpDefVal::IsDefault(nr->srtrack.trklikeRatio)){
01505           hname = varName[pos]+id;
01506           hm->Fill1d(hname,nr->srtrack.trklikeRatio,weight);
01507           } pos++; if(pos >= size) return;
01508      }if(varName[pos] == "srtrack.pulseHeightRatio") {
01509        if(!ANtpDefVal::IsDefault(nr->srtrack.pulseHeightRatio)){
01510           hname = varName[pos]+id;
01511           hm->Fill1d(hname,nr->srtrack.pulseHeightRatio,weight);
01512           } pos++; if(pos >= size) return;
01513      }
01514 
01515 
01516 //end of srtrack
01517 
01518 
01519      if(pos == lastpos) pos++;  //it couldnt find it in the list skip it
01520           lastpos = pos;  
01521    }
01522 
01523    return;     
01524 }     

TString CompareMD::MakeIdString ( NueRecord nr  ) 

Definition at line 285 of file CompareMD.cxx.

References det, VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), ANtpTruthInfo::interactionType, SimFlag::kData, Detector::kFar, SimFlag::kMC, Detector::kNear, NueRecord::mctrue, ANtpTruthInfoBeam::nonOscNuFlavor, and ANtpTruthInfo::nuFlavor.

Referenced by Ana().

00286 {
00287   Detector::Detector_t d = nr->GetHeader().GetVldContext().GetDetector();
00288   SimFlag::SimFlag_t s = nr->GetHeader().GetVldContext().GetSimFlag();
00289   TString det;
00290   TString dm;
00291   TString type;
00292 
00293   if(d==Detector::kFar){
00294     det = "f";
00295   }
00296   else if(d==Detector::kNear){
00297     det = "n";
00298   }
00299   else{
00300     det="u";
00301   }
00302   
00303   if(s==SimFlag::kData){
00304     dm = "_d";
00305     TString id = dm;
00306     return id;
00307   }
00308   else if (s==SimFlag::kMC){
00309     dm = "_m";
00310     
00311     if(nr->mctrue.interactionType==1){
00312       if(abs(nr->mctrue.nuFlavor)==12 && 
00313          abs(nr->mctrue.nonOscNuFlavor)==12){
00314         type = "bnue";
00315       }
00316       else if(abs(nr->mctrue.nuFlavor)==12){
00317         type = "nue";
00318       }
00319       else if(abs(nr->mctrue.nuFlavor)==14){
00320         type = "numu";
00321       }
00322       else if(abs(nr->mctrue.nuFlavor)==16){
00323         type = "nutau";
00324       }
00325       else{
00326         type = "u";
00327       }
00328     }
00329     else{
00330       type = "nc";
00331     }
00332     TString id = dm+ "_" + type;
00333     return id;
00334   }      
00335   else {
00336     dm = "_u";
00337     return dm;
00338   }
00339 
00340 }

bool CompareMD::PassesBeamCuts ( NueRecord nr  ) 

Definition at line 218 of file CompareMD.cxx.

References BeamMon::bI, NueRecord::bmon, RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), BeamMon::hbw, SimFlag::kData, BeamMon::nuTarZ, and BeamMon::vbw.

Referenced by Ana().

00219 {
00220   //bool passes = true;   
00221   if (nr->GetHeader().GetVldContext().GetSimFlag()!=SimFlag::kData) return true;
00222   if (nr->bmon.bI<0.1) return false;      //beam intensity (in 1e12)
00223   if (nr->bmon.hbw<0.8) return false;     //horizontal beam width
00224   if (nr->bmon.hbw>1.1) return false;
00225   if (nr->bmon.vbw<0.9) return false;     //vertical beam width
00226   if (nr->bmon.vbw>1.6) return false;
00227   if (nr->bmon.nuTarZ<500) return false;  //low energy position
00228   if (nr->bmon.nuTarZ>1000) return false;
00229   return true;
00230 }

bool CompareMD::PassesCuts ( NueRecord nr  ) 

Definition at line 233 of file CompareMD.cxx.

References NueRecord::anainfo, RecRecordImp< T >::GetHeader(), NueHeader::GetTrackLength(), ANtpEventInfoNue::hotch, AnalysisInfoNue::isFullyContained, ANtpEventInfoNue::phMeu, ANtpTrackInfo::planes, ANtpTrackInfo::pulseHeight, ANtpEventInfo::pulseHeight, ANtpShowerInfo::pulseHeight, NueRecord::srevent, NueRecord::srshower, and NueRecord::srtrack.

Referenced by Ana().

00234 {
00235     bool passes = true;   
00236 
00237     //dont even bother if there is a long track
00238     if(nr->srtrack.planes > 25) passes = false;
00239     if (nr->srevent.pulseHeight<2e4) return false;
00240 
00241     if  (nr->anainfo.isFullyContained != 1 && nr->anainfo.isFullyContained!= -2) passes = false;
00242 
00243     if (nr->srevent.phMeu>150) passes = false;
00244     
00245     if (nr->srevent.hotch==1) return false;
00246     
00247     if ((TMath::Max(nr->srtrack.pulseHeight,nr->srshower.pulseHeight)<5000)) 
00248         passes = false;
00249 
00250 //    if(nr->anainfo.inFiducialVolume != 1)
00251 //        passes = false;
00252 
00253     //fiducial volume cuts
00254 //    if ((pow(nr->srevent.vtxX-1.4885,2)+pow(nr->srevent.vtxY-0.1397,2))>0.81) return false;
00255 //    if (nr->srevent.vtxZ<1) return false;
00256 //    if (nr->srevent.vtxZ>6) return false;
00257     
00258 
00259 
00260 /*     if(nr->anainfo.isFullyContained == 1 || 
00261   Cuts += "NueRecord.srevent.phMeu > 1 && NueRecord.srevent.phMeu < 400 && ";
00262 
00263   string NC = "NueRecord.mctrue.interactionType == 0";
00264   string CC = "NueRecord.mctrue.interactionType == 1";
00265 
00266 
00267    Cuts += "NueRecord.anainfo.isFullyContained == 1 && ";
00268    Cuts += "(NueRecord.anainfo.isFullyContained == 1 || NueRecord.anainfo.isFullyContained == -2 ) && ";
00269      if(j == 2)  Cuts += "";
00270 
00271      TString isNumu = "&& abs(NueRecord.mctrue.nuFlavor) == 14";
00272      TString isBNue = "&& abs(NueRecord.mctrue.nuFlavor) == 12";
00273      TString isNue  = "&& abs(NueRecord.mctrue.nonOscNuFlavor) == 14";
00274 */
00275 
00276    //only look at events for which mst actually gets calculated
00277    if(nr->GetHeader().GetTrackLength()>25)
00278        passes = false;
00279 
00280     return passes;
00281      
00282 }


Member Data Documentation

vector<Float_t> CompareMD::beg [private]

Definition at line 46 of file CompareMD.h.

Referenced by BeginJob().

int CompareMD::counter [private]

Definition at line 44 of file CompareMD.h.

Referenced by Ana(), and BeginJob().

vector<Float_t> CompareMD::end [private]

Definition at line 47 of file CompareMD.h.

Referenced by BeginJob().

vector<TString> CompareMD::gtype [private]

Definition at line 49 of file CompareMD.h.

Referenced by BeginJob().

Int_t CompareMD::kNMCFiles [private]

Definition at line 51 of file CompareMD.h.

Referenced by Ana(), and Config().

vector<Int_t> CompareMD::nbins [private]

Definition at line 48 of file CompareMD.h.

Referenced by BeginJob().

vector<TString> CompareMD::varName [private]

Definition at line 45 of file CompareMD.h.

Referenced by BeginJob(), and FillFromList().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1