Athena Tip
pkgco.py -A TrkSpaceTimePoint //check out the head version
pkgco.py TrkSpaceTimePoint // check out the same version in the release
avn.py switch @TRUNK// change it in head version to commit
avn.py lstags [package name]// list of tags
avn.py ci -m "message "
avn tag TAG -m "message"
//..For publication, you should generally use fewer axis tick marks.
// On the y axis, for example, this gives approximately 4 major and 2
// minor divisions. -204 would give exactly 4 and 2.
hmassJpsi_sig->GetXaxis()->SetNdivisions(505);
hmassJpsi_sig->GetYaxis()->SetNdivisions(204);
TCanvas* c1 = new TCanvas("c1","", 0,0,1200,600);
c1->Divide(3,2);
c1->cd(1);
hmassJpsi->Draw();
c1->cd(2);
Unix...
xrdcp root://castoratlas//castor/cern.ch/myFile .
Standard Library
vector sort
If you sort vector of float or double or int, the smallest value will be in front.
vector pTs;
pTs.push_back(1);
pTs.push_back(0.1);
pTs.push_back(0.5);
sort(pTs.begin(), pTs.end());
cout << pTs[0] << " " << pTs[1] << " " << pTs[2] << endl;
> 0.1 0.5 1
Remove special character in string
string period= "L1Calo Stream ABC";
string period2 ="";
for (UInt_t i=0; i<period.size(); ++i) {
string selPeriod( period, i, 1);
if (selPeriod.find(" ")) {
period2 = period2 + selPeriod;
}
}
cout << period << endl;
cout << period2 << endl;
> L1Calo Stream ABC
> L1CaloStreamABC
TFileCollection* fileColl = new TFileCollection("fileColl");
fileColl->AddFromFile("input.txt");
TChain *c = new TChain("susy");
c->AddFileInfoList(fileColl->GetList());
std::vector < double, std::allocator < double > >::iterator pkit
= std::max_element( charges.begin(), charges.end() );
cp -pr file dir/
-p option preserve time stamp.
sshfs -p 555 wpark@strange.physics.sc.edu:/atlasdisk4/ /atlasdisk4/ -o allow_other
float myMaxPt( std::vector< float > * theVec )
{
float max = 0;
for (int z = 0; z< theVec->size(); z++ )
{
if ( theVec->at(z) > max ) max = heVec->at(z);
}
return max;
}
Then, in the Draw function:
chain.Draw(">>elist","(el_n >= 1 && myMaxPt(el_pt) > 15000.0)")
--
WooChunPark - 30-Aug-2010