parList+=onePar ;
snprintf(onePar,buffersize,"fConeSize: (isolation cone size) %1.2f\n",fConeSize) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"fPtThreshold =%1.2f (isolation pt threshold) \n",fPtThreshold) ;
+ snprintf(onePar,buffersize,"fPtThreshold >%1.2f;<1.2f (isolation pt threshold) \n",fPtThreshold,fPtThresholdMax) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"fPtFraction=%1.2f (isolation pt threshold fraction ) \n",fPtFraction) ;
+ snprintf(onePar,buffersize,"fSumPtThreshold >%1.2f;<1.2f (isolation sum pt threshold) \n",fSumPtThreshold,fSumPtThresholdMax) ;
+ parList+=onePar ;
+ snprintf(onePar,buffersize,"fPtFraction=%1.2f (isolation pt threshold fraction) \n",fPtFraction) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fICMethod=%d (isolation cut case) \n",fICMethod) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fPartInCone=%d \n",fPartInCone) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"fFracIsThresh=%i \n",fFracIsThresh) ;
+ snprintf(onePar,buffersize,"fFracIsThresh=%i \n",fFracIsThresh) ;
parList+=onePar ;
return parList;
if(phiC<0) phiC+=TMath::TwoPi();
Float_t etaC = pCandidate->Eta() ;
- Float_t pt = -100. ;
- Float_t eta = -100. ;
- Float_t phi = -100. ;
- Float_t rad = -100. ;
+ Float_t ptLead = -100. ;
+ Float_t pt = -100. ;
+ Float_t eta = -100. ;
+ Float_t phi = -100. ;
+ Float_t rad = -100. ;
Float_t coneptsumCluster = 0;
Float_t coneptsumTrack = 0;
eta = trackmix->Eta();
phi = trackmix->Phi() ;
}
-
+
if( phi < 0 ) phi+=TMath::TwoPi();
rad = Radius(etaC, phiC, eta, phi);
return ;
}
- //Check if there is any particle inside cone with pt larger than fPtThreshold
+ // // Check if there is any particle inside cone with pt larger than fPtThreshold
+ // Check if the leading particule inside the cone has a ptLead larger than fPtThreshold
- if( fDebug > 0 )
+ if( fDebug > 0 )
printf("\t track %d, pT %2.2f, eta %1.2f, phi %2.2f, R candidate %2.2f", ipr,pt,eta,phi,rad);
if(rad < fConeSize)
}
coneptsumTrack+=pt;
- if(pt > fPtThreshold && pt < fPtThresholdMax) n++;
- if(pt > fPtFraction*ptC ) nfrac++;
-
+
+ if( ptLead < pt ) ptLead = pt;
+
+// // *Before*, count particles in cone
+// if(pt > fPtThreshold && pt < fPtThresholdMax) n++;
+//
+// //if fPtFraction*ptC<fPtThreshold then consider the fPtThreshold directly
+// if(fFracIsThresh)
+// {
+// if( fPtFraction*ptC < fPtThreshold )
+// {
+// if( pt > fPtThreshold ) nfrac++ ;
+// }
+// else
+// {
+// if( pt > fPtFraction*ptC ) nfrac++;
+// }
+// }
+// else
+// {
+// if( pt > fPtFraction*ptC ) nfrac++;
+// }
+
} // Inside cone
if( fDebug > 0 ) printf("\n");
}// charged particle loop
-
}//Tracks
}
coneptsumCluster+=pt;
- if(pt > fPtThreshold && pt < fPtThresholdMax) n++;
- //if fPtFraction*ptC<fPtThreshold then consider the fPtThreshold directly
- if(fFracIsThresh)
- {
- if( fPtFraction*ptC < fPtThreshold )
- {
- if( pt > fPtThreshold ) nfrac++ ;
- }
- else
- {
- if( pt > fPtFraction*ptC ) nfrac++;
- }
- }
- else
- {
- if( pt > fPtFraction*ptC ) nfrac++;
- }
+
+ if( ptLead < pt ) ptLead = pt;
+
+// // *Before*, count particles in cone
+// if(pt > fPtThreshold && pt < fPtThresholdMax) n++;
+//
+// //if fPtFraction*ptC<fPtThreshold then consider the fPtThreshold directly
+// if(fFracIsThresh)
+// {
+// if( fPtFraction*ptC < fPtThreshold )
+// {
+// if( pt > fPtThreshold ) nfrac++ ;
+// }
+// else
+// {
+// if( pt > fPtFraction*ptC ) nfrac++;
+// }
+// }
+// else
+// {
+// if( pt > fPtFraction*ptC ) nfrac++;
+// }
}//in cone
if(fDebug > 0 ) printf("\n");
-
+
}// neutral particle loop
}//neutrals
-
//Add reference arrays to AOD when filling AODs only
- if(bFillAOD)
+ if(bFillAOD)
{
if(refclusters) pCandidate->AddObjArray(refclusters);
if(reftracks) pCandidate->AddObjArray(reftracks);
}
coneptsum = coneptsumCluster + coneptsumTrack;
+
+ // *Now*, just check the leading particle in the cone if the threshold is passed
+ if(ptLead > fPtThreshold && ptLead < fPtThresholdMax) n = 1;
+
+ //if fPtFraction*ptC<fPtThreshold then consider the fPtThreshold directly
+ if(fFracIsThresh)
+ {
+ if( fPtFraction*ptC < fPtThreshold )
+ {
+ if( ptLead > fPtThreshold ) nfrac = 1 ;
+ }
+ else
+ {
+ if( ptLead > fPtFraction*ptC ) nfrac = 1;
+ }
+ }
+ else
+ {
+ if( ptLead > fPtFraction*ptC ) nfrac = 1;
+ }
+
+ //-------------------------------------------------------------------
+ //Check isolation, depending on selected isolation criteria requested
- //Check isolation, depending on selected isolation criteria
if( fICMethod == kPtThresIC)
{
if( n == 0 ) isolated = kTRUE ;
}
else if( fICMethod == kSumPtIC )
{
- if( coneptsum > fSumPtThreshold && coneptsum < fSumPtThresholdMax )
+ if( coneptsum > fSumPtThreshold &&
+ coneptsum < fSumPtThresholdMax )
isolated = kFALSE ;
else
isolated = kTRUE ;
else if( fICMethod == kSumPtFracIC )
{
//when the fPtFraction*ptC < fSumPtThreshold then consider the later case
- // printf("photon analysis IsDataMC() ?%i\n",IsDataMC());
+ // printf("photon analysis IsDataMC() ?%i\n",IsDataMC());
if( fFracIsThresh )
{
if( fPtFraction*ptC < fSumPtThreshold && coneptsum < fSumPtThreshold ) isolated = kTRUE ;
printf("IC method = %d\n", fICMethod ) ;
printf("Cone Size = %1.2f\n", fConeSize ) ;
- printf("pT threshold = %2.1f\n", fPtThreshold) ;
+ printf("pT threshold = >%2.1f;<%2.1f\n", fPtThreshold , fPtThresholdMax) ;
+ printf("Sum pT threshold = >%2.1f;<%2.1f\n", fSumPtThreshold,fSumPtThresholdMax) ;
printf("pT fraction = %3.1f\n", fPtFraction ) ;
printf("particle type in cone = %d\n", fPartInCone ) ;
printf("using fraction for high pt leading instead of frac ? %i\n",fFracIsThresh);