コード例 #1
0
ファイル: MenuState.cpp プロジェクト: javakaian/OpenCVBitirme
void MenuState::update()
{
    if(KeyBoard::SPACE ==true && KeyBoard::runOnce)
    {
        std::cout<<"MenuState"<<std::endl;
       //sm->popState();
        PlayingState *pState = new PlayingState(screen,sm);
       sm->loadState(pState);

       KeyBoard::runOnce=false;




    }
    
    std::string line;
       std::ifstream myfile2 ("/root/Documents/input2.txt");
              if (myfile2.is_open())
              {
                while ( getline (myfile2,line) )
                {


                  if(line=="1")
                    {
                         PlayingState *pState = new PlayingState(screen,sm);
                        sm->loadState(pState);
                    }



                }
               myfile2.close();
              }


}
コード例 #2
0
void RagdollDemo::initPhysics()
{
	//ASSIGNMENT 8
	ragdolldemo = this;

	//ASSIGNMENT 9
	srand(time(NULL));

	//ASSIGNMENT 10
	pause = false;

	//ragdolldemo->touches = new btVector3*
	
	// Setup the basic world

	//setTexturing(true);
	//setShadows(true);

	setCameraDistance(btScalar(5.));

	m_collisionConfiguration = new btDefaultCollisionConfiguration();

	m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);

	btVector3 worldAabbMin(-10000,-10000,-10000);
	btVector3 worldAabbMax(10000,10000,10000);
	m_broadphase = new btAxisSweep3 (worldAabbMin, worldAabbMax);

	m_solver = new btSequentialImpulseConstraintSolver;

	m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_broadphase,m_solver,m_collisionConfiguration);
	//m_dynamicsWorld->getDispatchInfo().m_useConvexConservativeDistanceUtil = true;
	//m_dynamicsWorld->getDispatchInfo().m_convexConservativeDistanceThreshold = 0.01f;
	


	//ASSIGNMENT 10
	string line;
	ifstream myfile("../../RAGDOLL_DATA/weights.txt");	
	cout << "NORMAL SYNAPSE" << endl;
	for(int i = 0; i < 4; i++)
	{
		for(int k = 0; k < 8; k++)
		{
			getline(myfile,line);
			stringstream convert(line);
			convert >> synapseWeights[i][k];
			cout << synapseWeights[i][k] << " | ";
		}
		cout << endl;
	}
	myfile.close();
	
	//GET RECURRENT SYNAPSE
	line = "";
	ifstream myfile3("../../RAGDOLL_DATA/recurrent.txt");	
	cout << "RECURRNT SYNAPSE" << endl;
	for(int i = 0; i < 4; i++)
	{
		for(int k = 0; k < 8; k++)
		{
			getline(myfile3,line);
			stringstream convert(line);
			convert >> synapseRecurrent[i][k];
			cout << synapseRecurrent[i][k] << " | ";
		}
		cout << endl;
	}
	myfile.close();

	// GET MASK
	recurrentOn = false;
	line = "";
	cout << "PRINTING RECURRENT" << endl;
	ifstream myfile2("../../RAGDOLL_DATA/mask.txt");	
	for(int i = 0; i < 4; i++)
	{
		for(int k = 0; k < 8; k++)
		{
			getline(myfile2,line);
			stringstream convert(line);
			convert >> mask[i][k];
			cout << mask[i][k] << " | ";
			if(mask[i][k] == 1)
			{
				recurrentOn = true;
			}
		}
		cout << endl;
	}
	myfile2.close();

	cout << "INITIAL PEVIOUS TOUCH" << endl;
	//INITIAL PREVIOUS STEP = 0
	for(int i = 0; i < 4; i++)
	{
		previousTouch[i] = 0;
		cout << previousTouch[i] << " | ";
	}
	cout << endl;


	
	
	// Setup a big ground box
	{
		btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(200.),btScalar(10.),btScalar(200.)));
		m_collisionShapes.push_back(groundShape);
		btTransform groundTransform;
		groundTransform.setIdentity();
		groundTransform.setOrigin(btVector3(0,-10,0));

		#define CREATE_GROUND_COLLISION_OBJECT 1
		#ifdef CREATE_GROUND_COLLISION_OBJECT
			//ASSIGNMENT 8
		/*
			btTransform offset; 
			offset.setIdentity(); 
			offset.setOrigin(btVector3(btScalar(0),btScalar(-10),btScalar(0))); 
			btRigidBody* fixedGround = localCreateRigidBody(btScalar(1.0),offset, groundShape); 
			fixedGround->setCollisionFlags(3);
			*/
			btCollisionObject* fixedGround = new btCollisionObject();
			fixedGround->setFriction(btScalar(10000.0));
			fixedGround->setCollisionShape(groundShape);
			fixedGround->setWorldTransform(groundTransform);
			m_dynamicsWorld->addCollisionObject(fixedGround);



			currentIndex = 0;
			/*
			fixedGround->setCollisionFlags(fixedGround->getCollisionFlags() | btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
			fixedGround->setCenterOfMassTransform(offset);
			*/
			collisionID[currentIndex] = new collisionObject(currentIndex, (btRigidBody *)groundShape);
			fixedGround->setUserPointer(collisionID[currentIndex]);

			cout << "OBJECT ID: " << collisionID[currentIndex]->id;
			cout << " | POINTER ID: " << ((collisionObject*)fixedGround->getUserPointer())->id;
			cout << " | ADDRESS " << collisionID[currentIndex];
			cout << " | FLAGS " << collisionID[currentIndex]->body->getCollisionFlags() << endl;
			currentIndex++;		
		#else
				localCreateRigidBody(btScalar(0.),groundTransform,groundShape);
		#endif //CREATE_GROUND_COLLISION_OBJECT
	}

	gContactAddedCallback = callBackFunc;

	//BODY ------------------------------------------------------------------
	//(index, x, y, z, length, width, height)
	RagdollDemo::CreateBox(0, 0.0, 1.8, 0.0, 1.0, 0.2, 1.0);//WORKING


	//FEET
	RagdollDemo::CreateCylinder(3, 3.2, 0, 0, 1, .2, 0, M_PI_2, 0); //WORKING -> NORMAL
	RagdollDemo::CreateCylinder(4, -3.2, 0, 0, 1, .2, 0, -M_PI_2, 0); //WORKING -> NORMAL 
	RagdollDemo::CreateCylinder(8, 0, 0, -3.2, 1, .2, 0, M_PI_2, 0); //WORKING -> ROTATED
	RagdollDemo::CreateCylinder(6, 0, 0, 3.2, 1, .2, 0, M_PI_2, 0); //WORKING -> NORMAL ->  
	//ARM
	RagdollDemo::CreateCylinder(5, 0.0, 0.8, 2.0, 1.0, 0.2, M_PI_2, 0.0, 0.0);//WORKING -> ROTATED
	RagdollDemo::CreateCylinder(7, 0.0, 0.8, -2.0, 1.0, 0.2, M_PI_2, 0.0, 0.0);//WORKIN G-> ROTATED
	RagdollDemo::CreateCylinder(1, 2.0, .8, 0.0, 1.0, 0.2, 0.0, 0.0, M_PI_2);//WORKING -> NORMAL
	RagdollDemo::CreateCylinder(2, -2.0, .8, 0.0, 1.0, 0.2, 0, M_PI_2, M_PI_2);//WORKING -> NORMAL

	//FEET HINGE
	RagdollDemo::CreateHinge(2,3,1, btVector3(0.0, 0.0, 1.0), btVector3(0.0, 0.0, 1.0),btVector3(0.0, 1.0, 0.0), btVector3(0, -1.0, 0.0));//WORKING
	RagdollDemo::CreateHinge(3,4,2, btVector3(1.0, 0.0, 0.0), btVector3(0.0, 0.0, 1.0),btVector3(0.0, 1.0, 0.0), btVector3(0, 1.0, 0.0)); //WORKIN
	RagdollDemo::CreateHinge(6,7,8, btVector3(1.0, 0.0, 0.0), btVector3(1.0, 0.0, 0.0),btVector3(0.0, -1.0, 0.0), btVector3(0, 1.0, 0.0));//WORKING -> ROTATED
	RagdollDemo::CreateHinge(5,5,6, btVector3(1.0, 0.0, 0.0), btVector3(1.0, 0.0, 0.0),btVector3(0.0, 1.0, 0.0), btVector3(0, 1.0, 0.0));//WORKING -> ROTATED //

	//ARM HINGE
	RagdollDemo::CreateHinge(4,0,5, btVector3(1.0, 0.0, 0.0), btVector3(1.0, 0.0, 0.0),btVector3(0.0, 0.0, 1.0), btVector3(0, -1.0, 0.0));//WORKING -> ROTATED
	RagdollDemo::CreateHinge(7,0,7, btVector3(1.0, 0.0, 0.0), btVector3(1.0, 0.0, 0.0),btVector3(0.0, 0.0, -1.0), btVector3(0, 1.0, 0.0));//WORKING -> ROTATED
	RagdollDemo::CreateHinge(0,0,1, btVector3(0.0, 0.0, 1.0), btVector3(0.0, 0.0, 1.0), btVector3(1.0, 0.0, 0.0), btVector3(0.0, 1.0, 0.0));//WORKING
 	RagdollDemo::CreateHinge(1,0,2, btVector3(0.0, 0.0, 1.0), btVector3(0.0, 0.0, 1.0),btVector3(-1.0, 0.0, 0.0), btVector3(0.0, -1.0, 0.0));//WORKING
	
	clientResetScene();
}
コード例 #3
0
ファイル: TimeToolForRun.C プロジェクト: gsalazarq/TbTaTool
void TimeToolForRun(){


    const char* name_file[1000] = {

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0001_cosmc_v09_1506271603_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0002_cosmc_v09_1506271614_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0003_cosmc_v09_1506271629_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0004_cosmc_v09_1506271640_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0005_cosmc_v09_1506271651_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0006_cosmc_v09_1506271702_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0007_cosmc_v09_1506271713_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0008_cosmc_v09_1506271724_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0009_cosmc_v09_1506271735_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0010_cosmc_v09_1506271747_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0011_cosmc_v09_1506271758_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0012_cosmc_v09_1506271809_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0013_cosmc_v09_1506271820_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0014_cosmc_v09_1506271831_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0015_cosmc_v09_1506271842_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0016_cosmc_v09_1506271853_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0017_cosmc_v09_1506271904_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0018_cosmc_v09_1506271916_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0019_cosmc_v09_1506271926_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0020_cosmc_v09_1506271937_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0021_cosmc_v09_1506271949_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0022_cosmc_v09_1506272003_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0023_cosmc_v09_1506272015_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0024_cosmc_v09_1506272026_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001717_0025_cosmc_v09_1506272037_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001718_0001_cosmc_v09_1506272048_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001718_0002_cosmc_v09_1506272059_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001718_0003_cosmc_v09_1506272111_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001718_0004_cosmc_v09_1506272122_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001718_0005_cosmc_v09_1506272133_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0001_cosmc_v09_1506272153_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0002_cosmc_v09_1506272205_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0003_cosmc_v09_1506272216_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0004_cosmc_v09_1506272227_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0005_cosmc_v09_1506272238_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0006_cosmc_v09_1506272249_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0007_cosmc_v09_1506272300_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0008_cosmc_v09_1506272311_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0009_cosmc_v09_1506272322_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0010_cosmc_v09_1506272334_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0011_cosmc_v09_1506272348_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0012_cosmc_v09_1506272359_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0013_cosmc_v09_1506280010_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0014_cosmc_v09_1506280021_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0015_cosmc_v09_1506280033_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0016_cosmc_v09_1506280045_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0017_cosmc_v09_1506280056_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0018_cosmc_v09_1506280108_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0019_cosmc_v09_1506280119_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0020_cosmc_v09_1506280131_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Pos_Electrons/TB_00001721_0021_cosmc_v09_1506280142_camac.root",


			// 4GeV Pos

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0001_cosmc_v09_1506280220_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0002_cosmc_v09_1506280232_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0003_cosmc_v09_1506280242_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0004_cosmc_v09_1506280252_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0005_cosmc_v09_1506280302_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0006_cosmc_v09_1506280312_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0007_cosmc_v09_1506280322_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0008_cosmc_v09_1506280332_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0009_cosmc_v09_1506280342_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0010_cosmc_v09_1506280353_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0011_cosmc_v09_1506280403_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0012_cosmc_v09_1506280414_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0013_cosmc_v09_1506280424_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0014_cosmc_v09_1506280434_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0015_cosmc_v09_1506280444_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0016_cosmc_v09_1506280454_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0017_cosmc_v09_1506280507_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0018_cosmc_v09_1506280517_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0019_cosmc_v09_1506280528_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0020_cosmc_v09_1506280539_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0021_cosmc_v09_1506280549_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0022_cosmc_v09_1506280559_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0023_cosmc_v09_1506280609_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0024_cosmc_v09_1506280620_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001723_0025_cosmc_v09_1506280631_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0001_cosmc_v09_1506280647_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0002_cosmc_v09_1506280658_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0003_cosmc_v09_1506280708_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0004_cosmc_v09_1506280718_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0005_cosmc_v09_1506280728_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0006_cosmc_v09_1506280738_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0007_cosmc_v09_1506280748_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0008_cosmc_v09_1506280758_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0009_cosmc_v09_1506280808_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0010_cosmc_v09_1506280825_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0011_cosmc_v09_1506280837_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0012_cosmc_v09_1506280847_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0013_cosmc_v09_1506280857_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0014_cosmc_v09_1506280907_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0015_cosmc_v09_1506280918_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0016_cosmc_v09_1506280928_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0017_cosmc_v09_1506280938_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0018_cosmc_v09_1506280948_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0019_cosmc_v09_1506280958_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0020_cosmc_v09_1506281008_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0021_cosmc_v09_1506281018_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0022_cosmc_v09_1506281028_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0023_cosmc_v09_1506281038_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0024_cosmc_v09_1506281048_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Pos_Electrons/TB_00001724_0025_cosmc_v09_1506281059_camac.root",

			// 8 Pos

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001728_0001_cosmc_v09_1506281148_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001728_0002_cosmc_v09_1506281200_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001728_0003_cosmc_v09_1506281210_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001728_0004_cosmc_v09_1506281220_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001728_0005_cosmc_v09_1506281230_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0001_cosmc_v09_1507030536_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0002_cosmc_v09_1507030549_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0003_cosmc_v09_1507030600_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0004_cosmc_v09_1507030610_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0005_cosmc_v09_1507030620_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0006_cosmc_v09_1507030630_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0007_cosmc_v09_1507030640_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0008_cosmc_v09_1507030650_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0009_cosmc_v09_1507030700_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0010_cosmc_v09_1507030711_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0011_cosmc_v09_1507030721_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0012_cosmc_v09_1507030731_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0013_cosmc_v09_1507030741_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0014_cosmc_v09_1507030751_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0015_cosmc_v09_1507030801_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0016_cosmc_v09_1507030811_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0017_cosmc_v09_1507030821_camac.root",
			//"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Pos_Electrons/TB_00001769_0018_cosmc_v09_1507030831_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001760_0001_cosmc_v09_1507020353_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001760_0002_cosmc_v09_1507020404_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001760_0003_cosmc_v09_1507020415_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001760_0004_cosmc_v09_1507020426_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001760_0005_cosmc_v09_1507020437_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0001_cosmc_v09_1507021350_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0002_cosmc_v09_1507021354_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0003_cosmc_v09_1507021406_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0004_cosmc_v09_1507021416_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0005_cosmc_v09_1507021427_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0006_cosmc_v09_1507021437_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0007_cosmc_v09_1507021457_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0008_cosmc_v09_1507021508_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0009_cosmc_v09_1507021519_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0010_cosmc_v09_1507021555_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0011_cosmc_v09_1507021608_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0012_cosmc_v09_1507021619_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0013_cosmc_v09_1507021631_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0014_cosmc_v09_1507021732_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0015_cosmc_v09_1507021743_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0016_cosmc_v09_1507021753_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0017_cosmc_v09_1507021804_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0018_cosmc_v09_1507021814_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0019_cosmc_v09_1507021824_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0020_cosmc_v09_1507021834_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0021_cosmc_v09_1507021844_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0022_cosmc_v09_1507021854_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0023_cosmc_v09_1507021904_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0024_cosmc_v09_1507021916_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0025_cosmc_v09_1507021927_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0026_cosmc_v09_1507021938_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0027_cosmc_v09_1507021948_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0028_cosmc_v09_1507022001_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0029_cosmc_v09_1507022012_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0030_cosmc_v09_1507022023_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0031_cosmc_v09_1507022033_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0032_cosmc_v09_1507022044_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0033_cosmc_v09_1507022055_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0034_cosmc_v09_1507022105_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0035_cosmc_v09_1507022116_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0036_cosmc_v09_1507022129_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0037_cosmc_v09_1507022139_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/8GeV_Neg_Electrons/TB_00001765_0038_cosmc_v09_1507022149_camac.root",

			// 3 Pos

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0001_cosmc_v09_1507031038_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0002_cosmc_v09_1507031049_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0003_cosmc_v09_1507031100_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0004_cosmc_v09_1507031111_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0005_cosmc_v09_1507031121_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0006_cosmc_v09_1507031131_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0007_cosmc_v09_1507031135_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0008_cosmc_v09_1507031145_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0009_cosmc_v09_1507031155_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0010_cosmc_v09_1507031205_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0011_cosmc_v09_1507031216_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0012_cosmc_v09_1507031229_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0013_cosmc_v09_1507031239_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0014_cosmc_v09_1507031252_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0015_cosmc_v09_1507031303_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0016_cosmc_v09_1507031313_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0017_cosmc_v09_1507031323_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0018_cosmc_v09_1507031333_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0019_cosmc_v09_1507031344_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0020_cosmc_v09_1507031355_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0021_cosmc_v09_1507031406_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/3GeV_Pos_Electrons/TB_00001771_0022_cosmc_v09_1507031417_camac.root",

			// 5 +

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0001_cosmc_v09_1507031448_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0002_cosmc_v09_1507031459_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0003_cosmc_v09_1507031509_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0004_cosmc_v09_1507031519_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0005_cosmc_v09_1507031529_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0006_cosmc_v09_1507031539_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0007_cosmc_v09_1507031549_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0008_cosmc_v09_1507031620_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0009_cosmc_v09_1507031632_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0010_cosmc_v09_1507031709_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0011_cosmc_v09_1507031719_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0012_cosmc_v09_1507031729_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0013_cosmc_v09_1507031739_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0014_cosmc_v09_1507031749_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0015_cosmc_v09_1507031759_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0016_cosmc_v09_1507031809_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0017_cosmc_v09_1507031819_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0018_cosmc_v09_1507031829_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0019_cosmc_v09_1507031849_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0020_cosmc_v09_1507031900_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0021_cosmc_v09_1507031911_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0022_cosmc_v09_1507031922_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/5GeV_Pos_Electrons/TB_00001772_0023_cosmc_v09_1507031932_camac.root",

			// 2 -

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0001_cosmc_v09_1507031956_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0002_cosmc_v09_1507032008_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0003_cosmc_v09_1507032019_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0004_cosmc_v09_1507032030_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0005_cosmc_v09_1507032042_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0006_cosmc_v09_1507032053_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0007_cosmc_v09_1507032104_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0008_cosmc_v09_1507032115_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0009_cosmc_v09_1507032126_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0010_cosmc_v09_1507032137_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0011_cosmc_v09_1507032149_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0012_cosmc_v09_1507032200_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0013_cosmc_v09_1507032213_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0014_cosmc_v09_1507032224_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0015_cosmc_v09_1507032235_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0016_cosmc_v09_1507032247_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0017_cosmc_v09_1507032258_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0018_cosmc_v09_1507032309_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0019_cosmc_v09_1507032320_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0020_cosmc_v09_1507032331_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0021_cosmc_v09_1507032342_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0022_cosmc_v09_1507032354_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0023_cosmc_v09_1507040006_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0024_cosmc_v09_1507040018_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/2GeV_Neg_Electrons/TB_00001773_0025_cosmc_v09_1507040029_camac.root",

			//4 -

			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0001_cosmc_v09_1507040053_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0002_cosmc_v09_1507040105_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0003_cosmc_v09_1507040115_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0004_cosmc_v09_1507040125_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0005_cosmc_v09_1507040135_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0006_cosmc_v09_1507040145_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0007_cosmc_v09_1507040156_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0008_cosmc_v09_1507040233_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0009_cosmc_v09_1507040245_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0010_cosmc_v09_1507040256_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0011_cosmc_v09_1507040308_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0012_cosmc_v09_1507040319_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0013_cosmc_v09_1507040329_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0014_cosmc_v09_1507040422_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0015_cosmc_v09_1507040439_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0016_cosmc_v09_1507040449_camac.root",
			"/home/gsalazarq/sources/root/root/bin/files/run3_electron/4GeV_Neg_Electrons/TB_00001774_0017_cosmc_v09_1507040500_camac.root",

				};


    TFile *f[1000];
    TTree *tree[1000];

    Long64_t nentries_1, nentries_2, nentries_3, nentries_4, nentries_5, nentries_6;
    Long64_t sum1, sum2, sum3, sum4;
    nentries_1 = -404; nentries_2 = -404; nentries_3 = -404;
    sum1 = 0;  sum2 = 0; sum3 = 0 ; sum4 = 0;

    TString variable2 = "/home/gsalazarq/Dropbox/min_conocimiento/e45.MINERvA/tools/final_tools/final_final_tools/number_spills_entries/values_all.txt";
    char * myfile_name = variable2 ;
    ofstream myfile2 (myfile_name, ios::out | ios::app);
    if (myfile2.is_open());
    myfile2 <<"###" << endl;


    for(Int_t i=0; i<51+50+23+22+23+25+17; i++){ //For() over all the root files
        cout <<  i  << "." << endl  ;

        // Open the array_root_file[i] and the corresponding tree[i]

        f[i] = (TFile*)gROOT->GetListOfFiles()->FindObject(name_file[i]);

          if (!f[i] || !f[i]->IsOpen()) {
             f[i] = new TFile(name_file[i],"READ");
          }


        f[i]->GetObject("CAMACTree",tree[i]);
        //Init(tree[i]) ;
        //TimeToolForRun::Init(tree[i]);
      //  Init(tree[i]);      //f[i] equal to the tree corresponding to the array_file_root[i]

        // Tbegin of for each number of spills

        nentries_1 = tree[i]->GetEntries("In_spill > 0.5");
        nentries_2 = tree[i]->GetEntries("In_spill > 0.5 && Spill_number < 7");
        nentries_3 = tree[i]->GetEntries("In_spill > 0.5 && Spill_number < 3");
        nentries_4 = tree[i]->GetEntries("In_spill > 0.5 && Spill_number < 11");

        sum1 = nentries_1 + sum1;
        sum2 = nentries_2 + sum2;
        sum3 = nentries_3 + sum3;
        sum4 = nentries_4 + sum4;


      }


        myfile2 << "Spill number All: " << sum1 << endl;
        myfile2 << "Spill number 11: " << sum4 << endl;
        myfile2 << "Spill number 6: " << sum2 << endl;
        myfile2 << "Spill number 2: " << sum3 << endl;
        myfile2 <<"###" << endl;



}
コード例 #4
0
ファイル: biotools.cpp プロジェクト: wgerlach/CARMA3
void init_NCBI_NODES(const char * nodes, const char * merged, tax_id *& parent_taxid,  rank_t *& ranks, map<string, rank_t> *& rank_to_id, int NCBI_MAX) {




	parent_taxid = new tax_id[NCBI_MAX];
	for (int i = 0 ; i < NCBI_MAX; i++) parent_taxid[i] = 0;

	ranks = new rank_t[NCBI_MAX];
	for (int i = 0 ; i < NCBI_MAX; i++) ranks[i] = 0;

	rank_to_id = new map<string, rank_t>;


	//(*rank_to_id)["no rank"] = 0;
	rank_t last_used_rankid = 0;


	(*rank_to_id)["no rank"] 		= last_used_rankid++; // "0"
	(*rank_to_id)["superkingdom"]	= last_used_rankid++; // "1" and so on...
	(*rank_to_id)["kingdom"] 		= last_used_rankid++;
	(*rank_to_id)["subkingdom"] 	= last_used_rankid++;
	(*rank_to_id)["superphylum"] 	= last_used_rankid++;
	(*rank_to_id)["phylum"] 		= last_used_rankid++; // 5
	(*rank_to_id)["subphylum"] 		= last_used_rankid++;
	(*rank_to_id)["superclass"] 	= last_used_rankid++;
	(*rank_to_id)["class"] 			= last_used_rankid++;
	(*rank_to_id)["subclass"] 		= last_used_rankid++;
	(*rank_to_id)["infraclass"] 	= last_used_rankid++; //10
	(*rank_to_id)["cohort"] 		= last_used_rankid++;
	(*rank_to_id)["subcohort"] 		= last_used_rankid++;
	(*rank_to_id)["superorder"] 	= last_used_rankid++;
	(*rank_to_id)["order"]			= last_used_rankid++;
	(*rank_to_id)["suborder"] 		= last_used_rankid++; //15
	(*rank_to_id)["infraorder"] 	= last_used_rankid++;
	(*rank_to_id)["parvorder"] 		= last_used_rankid++;
	(*rank_to_id)["superfamily"] 	= last_used_rankid++;
	(*rank_to_id)["family"] 		= last_used_rankid++;
	(*rank_to_id)["subfamily"] 		= last_used_rankid++; //20
	(*rank_to_id)["tribe"] 			= last_used_rankid++;
	(*rank_to_id)["subtribe"] 		= last_used_rankid++;
	(*rank_to_id)["genus"] 			= last_used_rankid++;
	(*rank_to_id)["subgenus"] 		= last_used_rankid++;
	(*rank_to_id)["species group"] 	= last_used_rankid++; //25
	(*rank_to_id)["species subgroup"] = last_used_rankid++;
	(*rank_to_id)["species"] 		= last_used_rankid++;
	(*rank_to_id)["subspecies"] 	= last_used_rankid++;
	(*rank_to_id)["varietas"]		= last_used_rankid++;
	(*rank_to_id)["forma"] 			= last_used_rankid++; //30



	ifstream myfile (nodes);
	if (myfile.is_open())
	{

		string line;

		while (! myfile.eof() )	{

			std::getline(myfile,line );


			if (line.length() == 0) {
				continue;
			}

		//cout << line << endl;

			// get tax_id
			size_t l_start = line.find_first_of ( '\t', 0);
			if (l_start==string::npos) {
				cerr << "Error: init_NCBI_NODES" << endl;
				exit(EXIT_FAILURE);
				}
			string tax_id = line.substr(0, l_start);
			//cout << "XXXXXXXXXXXXXXXXXXXXx_TAXID: " << tax_id << endl;
			int tax_id_int = str2int(tax_id);



//if (tax_id_int > 40000) exit(0);
			// get parent
			l_start += 3; // tab,pipe,tab

			size_t l_end = line.find_first_of ( '\t', l_start);
			if (l_end==string::npos) {
				cerr << "Error: init_NCBI_NODES" << endl;
				exit(EXIT_FAILURE);
				}

			string parent = line.substr(l_start, l_end - l_start);
			int parent_int = str2int(parent);

			//cout << "p: \"" << parent << "\"" << endl;

			// get rank:
			l_start = l_end+3;
			l_end = line.find_first_of ( '\t', l_start);
			if (l_end==string::npos) {
				cerr << "Error: init_NCBI_NODES" << endl;
				exit(EXIT_FAILURE);
				}

			string rank_string = line.substr(l_start, l_end - l_start);
			//cout << "(" << rank_string << ")" << endl;

			map<string, rank_t>::iterator map_it;
			map_it =  rank_to_id->find(rank_string);

			rank_t rankid;
			if (map_it == rank_to_id->end()) {
					cerr << "not found: "<< rank_string << endl;

					exit(EXIT_FAILURE);

					last_used_rankid++;
					(*rank_to_id)[rank_string] = last_used_rankid;
					rankid=last_used_rankid;

			} else {
				//cout << "yes, found." << endl;
				rankid = (*map_it).second;

			}
//exit(0);
			if (tax_id_int > NCBI_MAX) {
					cerr << "sorry, NCBI_MAX is too small..." << endl;
					exit(EXIT_FAILURE);
			}

			if (parent_int > NCBI_MAX) {
					cerr << "sorry, NCBI_MAX is too small..." << endl;
					exit(EXIT_FAILURE);
			}

			parent_taxid[tax_id_int]=parent_int;
			ranks[tax_id_int]=rankid;
		}

		myfile.close();
	}

	else {
		cerr << "Error: Unable to open file " << nodes << endl;
		exit(1);
	}



	ifstream myfile2 (merged);
	if (myfile2.is_open())
	{
		string line;
		while (! myfile2.eof() )	{
			getline (myfile2,line, '\n');

			if (line.length() == 0) {
				continue;
			}


			size_t l_start = line.find_first_of ( '\t', 0);
			if (l_start==string::npos) {
				cerr << "Error: init_NCBI_NODES" << endl;
				exit(EXIT_FAILURE);
			}
			string old_id = line.substr(0, l_start);
			int old_id_int = str2int(old_id);

			l_start += 3; // tab,pipe,tab

			size_t l_end = line.find_first_of ( '\t', l_start);
			if (l_end==string::npos) {
				cerr << "Error: init_NCBI_NODES" << endl;
				exit(EXIT_FAILURE);
			}
			string new_id = line.substr(l_start, l_end - l_start);
			int new_id_int = str2int(new_id);

			if (old_id_int > NCBI_MAX) {
					cerr << "sorry, NCBI_MAX is too small..." << endl;
					exit(EXIT_FAILURE);
			}

			if (new_id_int > NCBI_MAX) {
					cerr << "sorry, NCBI_MAX is too small..." << endl;
					exit(EXIT_FAILURE);
			}

			parent_taxid[old_id_int]=parent_taxid[new_id_int];
			ranks[old_id_int]=ranks[new_id_int];

		}

		myfile2.close();
	}

	else {
		cerr << "Error: Unable to open file " << merged << endl;
		exit(1);
	}

	return;
}
コード例 #5
0
ファイル: Obj.cpp プロジェクト: joebain/joebabies
Vector2i Obj::load_heightmap(string file_name, float scale)
{
	
	int width = 0, height = 0;
	
	string line;
	ifstream myfile (file_name.c_str());
	if (myfile.is_open()) {
		while (! myfile.eof() ) {
			getline (myfile,line);
			int this_width = 0;
			for (string::iterator it=line.begin() ; it < line.end(); it++ )
				if (*it == ',') this_width++;
			if (width == 0) {
				width = this_width;
			} else if (this_width == 0) {
				break;
			} else if (this_width != width) {
				cerr << "all lines in the heightmap must be the same length" << endl;
			}
			height++;
		}
		myfile.close();
	} else {
		cerr << "could not open file " << file_name << endl;
	}
	
	int size = width*height;
	vertices = new Vertex[size];
	v_poss = new Vector3f[size];
	v_norms = new Vector3f[size];
	v_texts = new Vector2f[size];
	face_count = (width-1)*(height-1);
	faces = new Face[(width-1)*(height-1)];
	
	//myfile.open(file_name.c_str());
	ifstream myfile2 (file_name.c_str());
	for (int i = 0 ; i < height ; i++) {
		getline (myfile2,line);
		string tmp = "";
		int j = 0;
		for (string::iterator it=line.begin() ; it < line.end(); it++ ) {
			if (*it == ',') {
				int index = i*width+j;
				v_poss[index].init((i/*-((float)width)/2.0f*/)*scale,atof(tmp.c_str())*scale,(j/*-((float)height)/2.0f*/)*scale);
				v_texts[index].init(i,j);
				v_norms[index].init(0,1,0);
				vertices[index].pos = &v_poss[index];
				vertices[index].text = &v_texts[index];
				vertices[index].normal = &v_norms[index];
				
				tmp = "";
				j++;
			} else {
				tmp += *it;
			}
		}
	}
	myfile2.close();
	
	for (int i = 0; i < height-1 ; i++) {
		for (int j = 0; j < width-1 ; j++) {
			
			if (i > 0 && j > 0) {
				int index = i*width+j;
				//cout << "setting normal at:" << v_poss[index] << endl;
				
				Vector3f norm_i = v_poss[(i-1)*width+j].dir_between(v_poss[(i+1)*width+j]);
				//cout << "i dir " << norm_i << endl;
				norm_i.rotate(Vector3f(0,0,90));
				//cout << "i dir " << norm_i << endl;
				norm_i.point_up();
				//cout << "i dir " << norm_i << endl;
				Vector3f norm_j = v_poss[i*width+(j-1)].dir_between(v_poss[i*width+(j+1)]);
				//cout << "j dir " << norm_j << endl;
				norm_j.rotate(Vector3f(90,0,0));
				//cout << "j dir " << norm_j << endl;
				norm_j.point_up();
				//cout << "j dir " << norm_j << endl;
				
				v_norms[index] = (norm_i + norm_j);
				//cout << "normal " << v_norms[index] << endl;
				v_norms[index].normalise();
				//cout << "normal " << v_norms[index] << endl;
				vertices[index].normal = &v_norms[index];
				
				//cout << "set normal at " << v_poss[index] << " to " << v_norms[index] << endl;
			}
			
			int f_index = i*(width-1)+j;
			faces[f_index].vertex_count = 4;
			faces[f_index].vertices = new Vertex[4];
			faces[f_index].vertices[0] = vertices[i*width+j];
			faces[f_index].vertices[1] = vertices[i*width+(j+1)];
			faces[f_index].vertices[2] = vertices[(i+1)*width+(j+1)];
			faces[f_index].vertices[3] = vertices[(i+1)*width+j];
		}
	}
	
	Vector2i map_size(width,height);
	return map_size;
	
}
コード例 #6
0
ファイル: Apriori.cpp プロジェクト: francisng0201/Apriori
int main(int argc, char* argv[]){
	if (argc < 2){
		std::cerr << "Usage: " << argv[0] << " topic-X.txt, where X = 0, 1, 2, 3, 4"<<std::endl;
		return 1;
	}
	std::map<int, int> data;
	std::map<std::string, int> vocab_map;
	std::map<int, int>::iterator it;
	std::string line;
	double min_sup = 0.01;
	int transcation = 0;
	int j = 0;
	std::string name;
	if ((argv[1][6] - '0') == 0) name = "data/topic-0.txt";
	else if ((argv[1][6] - '0') == 1) name = "data/topic-1.txt";
	else if ((argv[1][6] - '0') == 2) name = "data/topic-2.txt";
	else if ((argv[1][6] - '0') == 3) name = "data/topic-3.txt";
	else if ((argv[1][6] - '0') == 4) name = "data/topic-4.txt";;
	std::ifstream myfile(name);
	if (myfile.is_open()){
		while (getline(myfile,line)){
			transcation++;
			for (size_t i =0; i<line.length();i++){
				if (isspace(line[i])){
				int value = stoi(line.substr(j,i-j));
				if (data.count(value) > 0)
					data.at(value)++;
				else data.insert(std::pair<int, int>(value,1));
				j = i+1;
				}
			}
			j = 0;
		}
	}
	myfile.close();

	int absolute_sup = min_sup * transcation;
	it = data.begin();
	while (it !=data.end())
	{
		if (it->second < absolute_sup){
			it = data.erase(it);
	}
		else{
			++it;
		}
	}

	std::ifstream myfile2("data/vocab.txt");
	if (myfile2.is_open()){
		while (getline(myfile2,line)){
			int value = 0;
			std::string vocab = "";
			for (size_t i =0; i<line.length();i++){
				if (line[i] == 9){
				value = stoi(line.substr(0,i));
				vocab = line.substr(i+1,line.length()-i);
				}
			}
			if (data.count(value) > 0)
				vocab_map.insert(std::pair<std::string, int>(vocab, data[value]));
		}
	}
	myfile2.close();

	std::ofstream write;
	std::string file;
	if ((argv[1][6] - '0') == 0) file = "pattern-0.txt";
	else if ((argv[1][6] - '0') == 1) file = "pattern-1.txt";
	else if ((argv[1][6] - '0') == 2) file = "pattern-2.txt";
	else if ((argv[1][6] - '0') == 3) file = "pattern-3.txt";
	else if ((argv[1][6] - '0') == 4) file = "pattern-4.txt";
	write.open(file);
	std::vector<std::pair<std::string, int>> v(vocab_map.begin(), vocab_map.end());
	std::sort(v.begin(), v.end(), cmp_value);
	for (size_t i =0; i != v.size();i++)
	write<<v[i].second<<"\t"<< v[i].first<<"\n";

	write.close();
	return 0;
}
コード例 #7
0
ファイル: vhtree.C プロジェクト: ankitm123/cmssw
void vhtree::Loop()
{
//   In a ROOT session, you can do:
//      Root > .L vhtree.C
//      Root > vhtree t
//      Root > t.GetEntry(12); // Fill t data members with entry number 12
//      Root > t.Show();       // Show values of entry 12
//      Root > t.Show(16);     // Read and show values of entry 16
//      Root > t.Loop();       // Loop on all entries
//

//     This is the loop skeleton where:
//    jentry is the global entry number in the chain
//    ientry is the entry number in the current Tree
//  Note that the argument to GetEntry must be:
//    jentry for TChain::GetEntry
//    ientry for TTree::GetEntry and TBranch::GetEntry
//
//       To read only selected branches, Insert statements like:
// METHOD1:
//    fChain->SetBranchStatus("*",0);  // disable all branches
//    fChain->SetBranchStatus("branchname",1);  // activate branchname
// METHOD2: replace line
//    fChain->GetEntry(jentry);       //read all branches
//by  b_branchname->GetEntry(ientry); //read only this branch
   if (fChain == 0) return;
   double delRMin=0.03;
   double delR=0.;
   double GenMuonPt=0.;                                                                                                            
   double delphi=0.;
   double deleta=0.;
   double RecoMuonPt=0.;
   double RecoMuonEta=0.;
   double inv_mass=0.;
   double ImpParam=0.;
   double MuonDZ=0.;
   double MuonChi2=0.;
   double SumMuonChi2=0.;
   double e1=0.;
   double e2=0.;
   double p1x=0.;
   double p2x=0.;
   double p1y=0.;
   double p2y=0.;
   double p1z=0.;
   double p2z=0.;
   double phi_1=0.;
   double phi_2=0;
   double theta_1=0;
   double theta_2=0;
   double metx=0.;
   double mety=0.;
   double p_1=0.;
   double p_2=0.;
   double x_1=0;
   double x_2=0;
   double pvis_1=0;
   double pvis_2=0;
   double inv_mass_vis=0;
   Double_t total_events=0;
   Double_t events=0;

   ofstream myfile("acceptance.file",ios::app);
   ofstream myfile2("acceptance2.file",ios::app);
   
   TH1F *h1PtReco = new TH1F("h1PtReco","Reco Muon Pt",100,0,300);
   TH1F *h1PtGen = new TH1F("h1PtGen","Gen Muon Pt",100,0,300);
   
   TH1F *h1PtLeading = new TH1F("h1PtLeading","Leading Muon Pt",100,0,100);
   TH1F *h1PtSubLeading = new TH1F("h1PtSubLeading","SubLeading Muon Pt",100,0,100);
   
   TH1F *h1PtLeadingi = new TH1F("h1PtLeadingi","Integrated Leading Muon Pt",100,0,100);
   TH1F *h1PtSubLeadingi = new TH1F("h1PtSubLeadingi","Integrated SubLeading Muon Pt",100,0,100);
   


   TH1F *h1EtaReco = new TH1F("h1EtaReco","Reco Muon Eta",100,-5,+5);
   //TH1F *h1EtaGen = new TH1F("h1EtaGen","Gen Muon Eta",100,-5,+5);
   
   TH1F *hPhiReco = new TH1F("hPhiReco","Difference in Phi between the two muons in multiples of #pi",100,-2,2);

   
   
   TH1F *hMCMatchEC = new TH1F("hMCMatchEC","Muon Pt resolution in End cap region",200,-0.5,0.5);
   TH1F *hMCMatchBa = new TH1F("hMCMatchBa","Muon Pt resolution in barrel region",200,-0.5,0.5);
   
   TH1F *hLeadMuon1 = new TH1F("hLeadMuon1","Leading Muon and Subleading Muon in EndCap",100,0,100);
   TH1F *hLeadMuon2 = new TH1F("hLeadMuon2","Leading Muon in Endcap, subleading muon in barrel",100,0,100);
   TH1F *hLeadMuon3 = new TH1F("hLeadMuon3","Leading Muon in Barrel, subleading muon in endcap",100,0,100);
   
   TH1F *hSubLeadMuon1 = new TH1F("hSubLeadMuon1","Leading Muon and Subleading Muon in EndCap",100,0,100);
   TH1F *hSubLeadMuon2 = new TH1F("hSubLeadMuon2","Leading Muon in Endcap, subleading muon in barrel",100,0,100);
   TH1F *hSubLeadMuon3 = new TH1F("hSubLeadMuon3","Leading Muon in Barrel, subleading muon in endcap",100,0,100);
   
   TH2F *h1 = new TH2F("h1","Correlation plot between Subleading and leading muon Pt(Overall)",30,0,30,30,0,30);
   TH2F *h11 = new TH2F("h11","Correlation plot between Subleading and leading muon Pt(EC(Lead), EC(sublead))",30,0,30,30,0,30);
   TH2F *h12 = new TH2F("h12","Correlation plot between Subleading and leading muon Pt(EC(Lead),Barrel(Sublead))",30,0,30,30,0,30);
   TH2F *h13 = new TH2F("h13","Correlation plot between Subleading and leading muon Pt(EC(sublead),Barrel(Lead))",30,0,30,30,0,30);
   //TH3F *h2 = new TH3F("h2","acceptance plot",300,0,300,100,0,150,100,0,1);
   TH2F *hAcceptAll = new TH2F("hAcceptAll","Overall acceptance plot",200,0,50,200,0,50);
   TH2F *hAccept1 = new TH2F("hAccept1","Leading Muon and Subleading Muon in EndCap",200,0,50,200,0,50);
   TH2F *hAccept2 = new TH2F("hAccept2","Leading Muon in Endcap, subleading muon in barrel",200,0,50,200,0,50);
   TH2F *hAccept3 = new TH2F("hAccept3","Leading Muon in Barrel, subleading muon in endcap",200,0,50,200,0,50);
   
   //TProfile2D *h2 = new TProfile2D("h2","acceptance plot",100,0,300,100,0,300,0,1);  
   //TGraph2D *t2 = new TGraph2D();
   TH1F *hInvTau = new TH1F("hInvTau","Invariant Mass plot for Taus",100,0,300);
   TH1F *hInvMuon = new TH1F("hInvMuon","Invariant Mass plot for Muons(visible)",100,0,300);

   
   
   TH1F *hImPEC = new TH1F("hImPEC","Impact parameter plot End cap",100,-0.3,0.3);
   TH1F *hImPBa = new TH1F("hImPBa","Impact parameter plot barrel",100,-0.3,0.3);
   
   TH1F *hDZEC = new TH1F("hDZEC","Muon DZ plot End cap",100,-10,10);
   TH1F *hDZBa = new TH1F("hDZBa","Muon DZ plot barrel",100,-10,10);

   TH1F *hChiEC = new TH1F("hChiEC","Muon Chi plot End cap",100,0,16);
   TH1F *hChiBa = new TH1F("hChiBa","Muon Chi plot barrel",100,0,16);

   TH1F *hImPECEr = new TH1F("hImPECEr","Error in Impact parameter plot End cap",100,0,16);
   TH1F *hImPBaEr = new TH1F("hImPBaEr","Error in Impact parameter plot barrel",100,0,16);

   //Muon eta plots for pT threshold !

   TH1F *hEtaPt10 = new TH1F("hEtaPt10","Reco Muon Eta 10",100,-3,3);
   TH1F *hEtaPt15 = new TH1F("hEtaPt15","Reco Muon Eta 15",100,-3,3);
   TH1F *hEtaPt20 = new TH1F("hEtaPt20","Reco Muon Eta 20",100,-3,3);
   TH1F *hEtaPt25 = new TH1F("hEtaPt25","Reco Muon Eta 25",100,-3,3);
   TH1F *hEtaPt30 = new TH1F("hEtaPt30","Reco Muon Eta 30",100,-3,3);
   TH1F *hEtaPt35 = new TH1F("hEtaPt35","Reco Muon Eta 35",100,-3,3);

   //2-D histograms

   TH2F *hEtaResEC = new TH2F("hEtaResEC","Eta vs MuonPt resolution in Endcap",100,-3,3,100,-5,5);
   TH2F *hEtaResBa = new TH2F("hEtaResBa","Eta vs MuonPt resolution in barrel",100,-3,3,100,-5,5);
   TH2F *hEtaResAll = new TH2F("hEtaResAll","Eta vs MuonPt resolution Overall",100,-3,3,100,-5,5);
   
   TH2F *hEtaPtEC = new TH2F("hEtaPtEC","Eta vs MuonPt in Endcap",100,-3,3,100,0,200);
   TH2F *hEtaPtBa = new TH2F("hEtaPtBa","Eta vs MuonPt in barrel",100,-3,3,100,0,200);
   TH2F *hEtaPtAll = new TH2F("hEtaPtAll","Eta vs MuonPt Overall",100,-3,3,100,0,200);
   


   //std::vector<double> leadmuonpt;
   //std::vector<double> subleadmuonpt;
   Double_t pt_cut=50.;
   Double_t bin_width=0.25;
   const int bin_size_sl=pt_cut/bin_width;
   const int bin_size_l=pt_cut/bin_width;
   
   Double_t leadmuonpt[bin_size_l]={0}; //100 is the number of bins
   Double_t subleadmuonpt[bin_size_sl]={0};
   
   Double_t leadmuonpt1[bin_size_l]={0}; //100 is the number of bins
   Double_t subleadmuonpt1[bin_size_sl]={0};
   
   Double_t leadmuonpt2[bin_size_l]={0}; //100 is the number of bins
   Double_t subleadmuonpt2[bin_size_sl]={0};
   
   Double_t leadmuonpt3[bin_size_l]={0}; //100 is the number of bins
   Double_t subleadmuonpt3[bin_size_sl]={0};

   //TFile *f1 = new TFile("histos_signal.root","RECREATE");

   
   Long64_t nentries = fChain->GetEntriesFast();
   cout<<"Number of events "<<nentries<<endl;
   int dimuon=0;
   Long64_t nbytes = 0, nb = 0;
   //for (Long64_t jentry=0;jentry<nentries;jentry++) {
   for (Long64_t jentry=0;jentry<nentries;jentry++) {
     Long64_t ientry = LoadTree(jentry);
     if (ientry < 0) break;
     nb = fChain->GetEntry(jentry);   nbytes += nb;
     
     if (nMuon!=2) continue;
     if (abs(Muon_phi[0]-Muon_phi[1] >= 2.0))continue;
     ++dimuon;
     

     if (Muon_pt[0]>Muon_pt[1]){
       h1PtLeading->Fill(Muon_pt[0]);
       h1PtSubLeading->Fill(Muon_pt[1]);
     }
     
     else if (Muon_pt[0]<Muon_pt[1]){
       h1->Fill(Muon_pt[1],Muon_pt[0]);
       cout<<Muon_pt[1]<<" "<<Muon_pt[0]<<endl;
     }
     
     

     //Different cases
     if (Muon_pt[0]>Muon_pt[1]){
	 if (((fabs(Muon_eta[0]) > 1.6) && (fabs(Muon_eta[0]) < 2.2)) && ((fabs(Muon_eta[1]) > 1.6) && (fabs(Muon_eta[1]) < 2.2))){
	   hLeadMuon1->Fill(Muon_pt[0]);
	   hSubLeadMuon1->Fill(Muon_pt[1]);
	   h1->Fill(Muon_pt[0],Muon_pt[1]);
	   h11->Fill(Muon_pt[0],Muon_pt[1]);
	   if (Muon_pt[0]<pt_cut){
	     for (int i=0;i<bin_size_l;i++){
	       if (Muon_pt[0]>=i*bin_width && Muon_pt[0]<(i+1)*bin_width){
		 leadmuonpt[i]+=1;
		 leadmuonpt1[i]+=1;
	       }
	     }
	   }
       
	   if (Muon_pt[1]<pt_cut){
	     for (int i=0;i<bin_size_sl;i++){
	       if (Muon_pt[1]>i*bin_width && Muon_pt[1]<=(i+1)*bin_width){
		 subleadmuonpt[i]+=1;
		 subleadmuonpt1[i]+=1;
	       }
	     }
	   }
	 }
	 if (((fabs(Muon_eta[0]) > 1.6) && (fabs(Muon_eta[0]) < 2.2)) && (fabs(Muon_eta[1]) < 1.6)){
	   h1->Fill(Muon_pt[0],Muon_pt[1]);
	   h12->Fill(Muon_pt[0],Muon_pt[1]);
	   hLeadMuon2->Fill(Muon_pt[0]);
	   hSubLeadMuon2->Fill(Muon_pt[1]);
	   if (Muon_pt[0]<pt_cut){
	     for (int i=0;i<bin_size_l;i++){
	       if (Muon_pt[0]>=i*bin_width && Muon_pt[0]<(i+1)*bin_width){
		 leadmuonpt[i]+=1;
		 leadmuonpt2[i]+=1;
	       }
	     }
	   }
       
	   if (Muon_pt[1]<pt_cut){
	     for (int i=0;i<bin_size_sl;i++){
	       if (Muon_pt[1]>i*bin_width && Muon_pt[1]<=(i+1)*bin_width){
		 subleadmuonpt[i]+=1;
		 subleadmuonpt2[i]+=1;
	       }
	     }
	   }
	 }
	 if ((fabs(Muon_eta[0]) < 1.6) && ((fabs(Muon_eta[1]) > 1.6) && (fabs(Muon_eta[1]) < 2.2))){
	   h1->Fill(Muon_pt[0],Muon_pt[1]);
	   h13->Fill(Muon_pt[0],Muon_pt[1]);
	   hLeadMuon3->Fill(Muon_pt[0]);
           hSubLeadMuon3->Fill(Muon_pt[1]);
	   if (Muon_pt[0]<pt_cut){
	     for (int i=0;i<bin_size_l;i++){
	       if (Muon_pt[0]>=i*bin_width && Muon_pt[0]<(i+1)*bin_width){
		 leadmuonpt[i]+=1;
		 leadmuonpt3[i]+=1;
	       }
	     }
	   }
       
	   if (Muon_pt[1]<pt_cut){
	     for (int i=0;i<bin_size_sl;i++){
	       if (Muon_pt[1]>i*bin_width && Muon_pt[1]<=(i+1)*bin_width){
		 subleadmuonpt[i]+=1;
		 subleadmuonpt3[i]+=1;
	       }
	     }
	   }
	 }
     } 
       else{
	 if (((fabs(Muon_eta[1]) > 1.6) && (fabs(Muon_eta[1]) < 2.2)) && ((fabs(Muon_eta[0]) > 1.6) && (fabs(Muon_eta[0]) < 2.2))){
	   hLeadMuon1->Fill(Muon_pt[1]);
	   hSubLeadMuon1->Fill(Muon_pt[0]);
	 }
	 if (((fabs(Muon_eta[1]) > 1.6) && (fabs(Muon_eta[1]) < 2.2)) && (fabs(Muon_eta[0]) < 1.6)){
	   hLeadMuon2->Fill(Muon_pt[1]);
	   hSubLeadMuon2->Fill(Muon_pt[0]);
	 }
	 if ((fabs(Muon_eta[1]) < 1.6) && ((fabs(Muon_eta[0]) > 1.6) && (fabs(Muon_eta[0]) < 2.2))){
	   hLeadMuon3->Fill(Muon_pt[1]);
           hSubLeadMuon3->Fill(Muon_pt[0]);
	 }
      
       }
     for (int i=0;i<nMuon; i++){
       RecoMuonPt=Muon_pt[i];
       RecoMuonEta=Muon_eta[i];
       GenMuonPt=Muon_ptgen[i];
       ImpParam=Muon_trkD0[i];
       MuonDZ=Muon_trkDz[i];
       MuonChi2=Muon_globalChi2[i];
     
       if ((fabs(RecoMuonEta) > 1.5) && (fabs(RecoMuonEta) < 2.2)){
	 hMCMatchEC->Fill((GenMuonPt-RecoMuonPt)/GenMuonPt);
	 hImPEC->Fill(ImpParam);
	 hDZEC->Fill(MuonDZ);
	 hChiEC->Fill(MuonChi2);
	 hEtaPtEC->Fill(RecoMuonEta,RecoMuonPt);
	 //hEtaResEC->Fill(RecoMuonPt-GenMuonPt,RecoMuonEta);
       }
       if ((fabs(Muon_eta[i]) < 1.6)){
	 hMCMatchBa->Fill((GenMuonPt-RecoMuonPt)/GenMuonPt);
	 hImPBa->Fill(ImpParam);
	 hDZBa->Fill(MuonDZ);
	 hChiBa->Fill(MuonChi2);
	 hEtaPtBa->Fill(RecoMuonEta,RecoMuonPt);
       }
       h1PtGen->Fill(GenMuonPt);
       h1PtReco->Fill(RecoMuonPt);
       h1EtaReco->Fill(RecoMuonEta);
       hEtaPtAll->Fill(RecoMuonEta,RecoMuonPt);
       if (RecoMuonPt>10.)hEtaPt10->Fill(RecoMuonEta);  
       if (RecoMuonPt>15.)hEtaPt15->Fill(RecoMuonEta);  
       if (RecoMuonPt>20.)hEtaPt20->Fill(RecoMuonEta);
       if (RecoMuonPt>25.)hEtaPt25->Fill(RecoMuonEta);         
       if (RecoMuonPt>30.)hEtaPt30->Fill(RecoMuonEta);
       if (RecoMuonPt>35.)hEtaPt35->Fill(RecoMuonEta);  
       //if ()
     }
    
   }
   cout<<"Number of dimuon events "<<dimuon<<" BR of di tau to dimuon "<<((float)dimuon/(float)nentries)*100<<endl;
   
   //Overall
   /*
   total_events=0;
   events=0;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       if(leadmuonpt[i]!=0 && subleadmuonpt[j]!=0)total_events+=leadmuonpt[i]*subleadmuonpt[j];
     }
   }
   cout<<total_events<<endl;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       events=0;
       for (int k=i;k<bin_size_l;k++){
	 for (int l=j;l<k;l++){
	   if(leadmuonpt[k]!=0 && subleadmuonpt[l]!=0)events+=leadmuonpt[k]*subleadmuonpt[l];
	 }
       }
       hAcceptAll->Fill(i*bin_width,j*bin_width,(Double_t)events/(Double_t)total_events);
     }
   }
   

   //Case-1
   
   total_events=0;
   events=0;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       if(leadmuonpt1[i]!=0 && subleadmuonpt1[j]!=0)total_events+=leadmuonpt1[i]*subleadmuonpt1[j];
     }
   }
   cout<<total_events<<endl;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       events=0;
       for (int k=i;k<bin_size_l;k++){
	 for (int l=j;l<k;l++){
	   if(leadmuonpt1[k]!=0 && subleadmuonpt1[l]!=0)events+=leadmuonpt1[k]*subleadmuonpt1[l];
	 }
       }
       hAccept1->Fill(i*bin_width,j*bin_width,(Double_t)events/(Double_t)total_events);
     }
   }
   
   //Case-2
   total_events=0;
   events=0;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       if(leadmuonpt2[i]!=0 && subleadmuonpt2[j]!=0)total_events+=leadmuonpt2[i]*subleadmuonpt2[j];
     }
   }
   cout<<total_events<<endl;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       events=0;
       for (int k=i;k<bin_size_l;k++){
	 for (int l=j;l<k;l++){
	   if(leadmuonpt2[k]!=0 && subleadmuonpt2[l]!=0)events+=leadmuonpt2[k]*subleadmuonpt2[l];
	 }
       }
       hAccept2->Fill(i*bin_width,j*bin_width,(Double_t)events/(Double_t)total_events);
     }
   }

   //Case-3

   total_events=0;
   events=0;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       if(leadmuonpt3[i]!=0 && subleadmuonpt3[j]!=0)total_events+=leadmuonpt3[i]*subleadmuonpt3[j];
     }
   }
   cout<<total_events<<endl;
   for (int i=0;i<bin_size_l;i++){
     for (int j=0;j<i;j++){
       events=0;
       for (int k=i;k<bin_size_l;k++){
	 for (int l=j;l<k;l++){
	   if(leadmuonpt3[k]!=0 && subleadmuonpt3[l]!=0)events+=leadmuonpt3[k]*subleadmuonpt3[l];
	 }
       }
       //myfile2<<i<<" "<<j<<" "<<" "<<events<<" "<<total_events<<" "<<(Double_t)events/(Double_t)total_events<<endl;
       //myfile2<<i*bin_width<<" "<<j*bin_width<<" "<<(Double_t)events/(Double_t)total_events<<endl;
       hAccept3->Fill(i*bin_width,j*bin_width,(Double_t)events/(Double_t)total_events);
       //hAccept1->Fill(i*bin_width,j*bin_width);
     }
   }
   hAcceptAll->Write();
   
   //Time to beautify most of the plots
   hLeadMuon1->SetLineColor(1);
   hSubLeadMuon1->SetLineColor(4);
   hLeadMuon1->SetXTitle("Reco. Muon p_{T} in GeV/c");
   hSubLeadMuon1->SetXTitle("Reco. Muon p_{T} in GeV/c");
   hLeadMuon1->SetYTitle("Number of Events/GeV");
   hSubLeadMuon1->SetYTitle("Number of Events/GeV");
   hSubLeadMuon1->Draw();
   gPad->Update();
   hLeadMuon1->Draw();          //draw hist_2 first as it has a larger range
   gPad->Update();


   TPaveStats *tps1 = (TPaveStats*) hLeadMuon1->FindObject("stats");
   tps1->SetName("Hist1 Stats");
   double X1 = tps1->GetX1NDC();
   double Y1 = tps1->GetY1NDC();
   double X2 = tps1->GetX2NDC();
   double Y2 = tps1->GetY2NDC();
  
   TPaveStats *tps2 = (TPaveStats*) hSubLeadMuon1->FindObject("stats");
   tps2->SetTextColor(kRed);
   tps2->SetLineColor(kRed);
   tps2->SetX1NDC(X1);
   tps2->SetX2NDC(X2);
   tps2->SetY1NDC(Y1-(Y2-Y1));
   tps2->SetY2NDC(Y1);
   
  
  
   hSubLeadMuon1->Draw();
   hLeadMuon1->Draw("same");          //draw hist_2 first as it has a larger range
   tps2->Draw("same");
   tps1->Draw("same");
   
   leg_hist = new TLegend(0.4712644,0.5886076,0.7600575,0.778481,NULL,"brNDC");
   leg_hist->SetHeader("p_{T} histograms for case 1");
   leg_hist->SetFillColor(0);
   leg_hist->AddEntry(hLeadMuon1,"leading muon p_{T}","l");
   leg_hist->AddEntry(hSubLeadMuon1,"subleading muon p_{T}","l");
   leg_hist->SetTextSize(0.03);
   leg_hist->Draw();
  
   c1->SaveAs("case1.pdf");
   c1->Clear();
   

   hLeadMuon2->SetLineColor(1);
   hSubLeadMuon2->SetLineColor(4);
   hLeadMuon2->SetXTitle("Reco Muon p_{T} in GeV/c");
   hSubLeadMuon2->SetXTitle("Reco Muon p_{T} in GeV/c");
   hLeadMuon2->SetYTitle("Number of Events/GeV");
   hSubLeadMuon2->SetYTitle("Number of Events/GeV");
   hSubLeadMuon2->Draw();
   gPad->Update();
   hLeadMuon2->Draw();
   gPad->Update();
   //draw hist_2 first as it has a larger range
   TPaveStats *tps1 = (TPaveStats*) hLeadMuon2->FindObject("stats");
   tps1->SetName("Hist1 Stats");
   double X1 = tps1->GetX1NDC();
   double Y1 = tps1->GetY1NDC();
   double X2 = tps1->GetX2NDC();
   double Y2 = tps1->GetY2NDC();
   
   TPaveStats *tps2 = (TPaveStats*) hSubLeadMuon2->FindObject("stats");
   tps2->SetTextColor(kRed);
   tps2->SetLineColor(kRed);
   tps2->SetX1NDC(X1);
   tps2->SetX2NDC(X2);
   tps2->SetY1NDC(Y1-(Y2-Y1));
   tps2->SetY2NDC(Y1);
   
  
  
   hSubLeadMuon2->Draw();
   hLeadMuon2->Draw("same");          //draw hist_2 first as it has a larger range
   tps2->Draw("same");
   tps1->Draw("same");
   
   leg_hist = new TLegend(0.4712644,0.5886076,0.7600575,0.778481,NULL,"brNDC");
   leg_hist->SetHeader("p_{T} histograms for case 2");
   leg_hist->SetFillColor(0);
   leg_hist->AddEntry(hLeadMuon2,"leading muon p_{T}","l");
   leg_hist->AddEntry(hSubLeadMuon2,"subleading muon p_{T}","l");
   leg_hist->SetTextSize(0.03);
   leg_hist->Draw();
   
   c1->SaveAs("case2.pdf");
  
   
   hLeadMuon3->SetLineColor(1);
   hSubLeadMuon3->SetLineColor(4);
   hLeadMuon3->SetXTitle("Reco Muon p_{T} in GeV/c");
   hSubLeadMuon3->SetXTitle("Reco Muon p_{T} in GeV/c");
   hLeadMuon3->SetYTitle("Number of Events/GeV");
   hSubLeadMuon3->SetYTitle("Number of Events/GeV");
   hSubLeadMuon3->Draw();
   gPad->Update();
   hLeadMuon3->Draw();          //draw hist_2 first as it has a larger range
   gPad->Update();
   
   TPaveStats *tps1 = (TPaveStats*) hLeadMuon3->FindObject("stats");
   tps1->SetName("Hist1 Stats");
   double X1 = tps1->GetX1NDC();
   double Y1 = tps1->GetY1NDC();
   double X2 = tps1->GetX2NDC();
   double Y2 = tps1->GetY2NDC();
   
   TPaveStats *tps2 = (TPaveStats*) hSubLeadMuon3->FindObject("stats");
   tps2->SetTextColor(kRed);
   tps2->SetLineColor(kRed);
   tps2->SetX1NDC(X1);
   tps2->SetX2NDC(X2);
   tps2->SetY1NDC(Y1-(Y2-Y1));
   tps2->SetY2NDC(Y1);
   
   
   
   hSubLeadMuon3->Draw();
   hLeadMuon3->Draw("same");          //draw hist_2 first as it has a larger range
   tps2->Draw("same");
   tps1->Draw("same");
   
   
   leg_hist = new TLegend(0.4712644,0.5886076,0.7600575,0.778481,NULL,"brNDC");
   leg_hist->SetHeader("p_{T} histograms for case 3");
   leg_hist->SetFillColor(0);
   leg_hist->AddEntry(hLeadMuon3,"leading muon p_{T}","l");
   leg_hist->AddEntry(hSubLeadMuon3,"subleading muon p_{T}","l");
   leg_hist->SetTextSize(0.03);
   leg_hist->Draw();
   
   c1->SaveAs("case3.pdf");
   c1->Clear();
   
   //pT resolution plots

   hMCMatchEC->SetLineColor(1);
   
   hMCMatchEC->SetXTitle("p_{T}^{gen}-p_{T}^{reco}/p_{T}^{gen}");
   hMCMatchEC->Draw();          //draw hist_2 first as it has a larger range
   hMCMatchEC->Draw("esame");          //draw hist_2 first as it has a larger range
   c1->SaveAs("plot_res_1.pdf");
   c1->Clear();

   hMCMatchBa->SetLineColor(1);
   
   hMCMatchBa->SetXTitle("p_{T}^{gen}-p_{T}^{reco}/p_{T}^{gen}");
   hMCMatchBa->Draw();          //draw hist_2 first as it has a larger range
   hMCMatchBa->Draw("esame");          //draw hist_2 first as it has a larger range
   c1->SaveAs("plot_res_2.pdf");
   c1->Clear();

   //Acceptance plots
   
   //Overall Acceptance
   
   hAcceptAll->SetXTitle("Reco. leading muon p_{T} in GeV/c");
   hAcceptAll->SetYTitle("Reco. subleading muon p_{T} in GeV/c");
  //hAcceptAll->SetZTitle("Kinematic acceptance");
   hAcceptAll->SetStats(0);
   hAcceptAll->Draw("cont3 colz");
   //HLT_PATH Mu17_Mu8
   
   Int_t a=hAcceptAll->GetXaxis()->FindBin(17);
   Int_t b = hAcceptAll->GetYaxis()->FindBin(8);
   Double_t c = hAcceptAll->GetBinContent(a,b);
   //Double_t a = hAcceptAll->GetBinContent(hAcceptAll->GetXaxis()->FindBin(17),hAcceptAll->GetYaxis()->FindBin(8)));
   //HLT_PATH Mu13_Mu8
   //Double_t f=hAcceptAll->GetBinContent(
   Int_t d = hAcceptAll->GetXaxis()->FindBin(13);
   Int_t e = hAcceptAll->GetYaxis()->FindBin(8);
   Double_t f = hAcceptAll->GetBinContent(d,e);
  //Offline Cuts
  
   Int_t g=hAcceptAll->GetXaxis()->FindBin(20);
   Int_t h=hAcceptAll->GetYaxis()->FindBin(10);
   Double_t z=hAcceptAll->GetBinContent(g,h);
  //Double_t i=GetBinContenthAcceptAll->GetXaxis()->FindBin(20),hAcceptAll->GetYaxis()->FindBin(10));

   cout<<c<<" "<<f<<" "<<z<<endl;
  
  //Double_t m=hAcceptAll->GetBinContent(k,l);
  //draw hist_2 first as it has a larger range
  
   TLatex latex;
  //latex.DrawLatex(17,8,TString::Format("#bullet %f ",a));
  //latex.DrawLatex(17,8,TString::Format("#bullet %2f %",c*100));
   latex.DrawLatex(17,8,"#bullet 64%");
   latex.DrawLatex(13,8,"#diamond 72%");
   latex.DrawLatex(20,10,"#color[2]{#bullet} 43%");
  //latex.DrawLatex(17,8,TString::Format("%f",c));
  //latex.DrawLatex(17,8,TString::Format("%f",c));
  //latex.DrawLatex(13,8,TString::Format("#diamond %f ",f));
  
  //latex.DrawLatex(20,10,TString::Format("#circ %f ",i));
  
   latex.DrawLatex(3,22,"#bullet");
   latex.DrawLatex(2.83,25,"#diamond");
  
  
  
   latex.DrawLatex(4,28,"#scale[0.8]{HLT Paths(Run-1)}");
   latex.DrawLatex(4,22,"#scale[0.8]{Mu17_Mu8 (Luminosity 19.1 fb^{-1})}");
   latex.DrawLatex(4,25,"#scale[0.8]{Mu13_Mu8 (Luminosity 3.7 fb^{-1})}");
  
   latex.DrawLatex(4,19,"#scale[0.8]{Offline selection}");
   latex.DrawLatex(3,16,"#color[2]{#bullet}");
   latex.DrawLatex(4,16,"#scale[0.8]{Mu20_Mu10}");
   c1->SaveAs("acceptance_2d_all_cont3.pdf");
  
   //Case-1
   */
}